1 | # property-blacklist
|
2 |
|
3 | Specify a blacklist of disallowed properties.
|
4 |
|
5 |
|
6 | ```css
|
7 | a { text-rendering: optimizeLegibility; }
|
8 | /** ↑
|
9 | * This property */
|
10 | ```
|
11 |
|
12 | ## Options
|
13 |
|
14 | `array|string`: `["array", "of", "unprefixed", /properties/ or "regex"]|"property"|"/regex/"`|/regex/
|
15 |
|
16 | If a string is surrounded with `"/"` (e.g. `"/^background/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^background/` will match `background`, `background-size`, `background-color`, etc.
|
17 |
|
18 | Given:
|
19 |
|
20 | ```
|
21 | ["text-rendering", "animation", "/^background/"]
|
22 | ```
|
23 |
|
24 | The following patterns are considered violations:
|
25 |
|
26 |
|
27 | ```css
|
28 | a { text-rendering: optimizeLegibility; }
|
29 | ```
|
30 |
|
31 |
|
32 | ```css
|
33 | a {
|
34 | animation: my-animation 2s;
|
35 | color: pink;
|
36 | }
|
37 | ```
|
38 |
|
39 |
|
40 | ```css
|
41 | a { -webkit-animation: my-animation 2s; }
|
42 | ```
|
43 |
|
44 |
|
45 | ```css
|
46 | a { background: pink; }
|
47 | ```
|
48 |
|
49 |
|
50 | ```css
|
51 | a { background-size: cover; }
|
52 | ```
|
53 |
|
54 | The following patterns are _not_ considered violations:
|
55 |
|
56 |
|
57 | ```css
|
58 | a { color: pink; }
|
59 | ```
|
60 |
|
61 |
|
62 | ```css
|
63 | a { no-background: sure; }
|
64 | ```
|