UNPKG

844 BMarkdownView Raw
1# function-blacklist
2
3Specify a blacklist of disallowed functions.
4
5<!-- prettier-ignore -->
6```css
7a { transform: scale(1); }
8/** ↑
9 * This function */
10```
11
12## Options
13
14`array|string`: `["array", "of", "unprefixed", /functions/ or "regex"]|"function"|"/regex/"`
15
16If a string is surrounded with `"/"` (e.g. `"/^rgb/"`), it is interpreted as a regular expression.
17
18Given:
19
20```
21["scale", "rgba", "linear-gradient"]
22```
23
24The following patterns are considered violations:
25
26<!-- prettier-ignore -->
27```css
28a { transform: scale(1); }
29```
30
31<!-- prettier-ignore -->
32```css
33a {
34 color: rgba(0, 0, 0, 0.5);
35}
36```
37
38<!-- prettier-ignore -->
39```css
40a {
41 background:
42 red,
43 -moz-linear-gradient(45deg, blue, red);
44}
45```
46
47The following patterns are _not_ considered violations:
48
49<!-- prettier-ignore -->
50```css
51a { background: red; }
52```