1 | # property-blacklist
|
2 |
|
3 | **_Deprecated: Instead use the [`property-disallowed-list`](../property-disallowed-list/README.md) rule._**
|
4 |
|
5 | Specify a list of disallowed properties.
|
6 |
|
7 |
|
8 | ```css
|
9 | a { text-rendering: optimizeLegibility; }
|
10 | /** ↑
|
11 | * This property */
|
12 | ```
|
13 |
|
14 | ## Options
|
15 |
|
16 | `array|string`: `["array", "of", "unprefixed", /properties/ or "regex"]|"property"|"/regex/"`|/regex/
|
17 |
|
18 | 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.
|
19 |
|
20 | Given:
|
21 |
|
22 | ```
|
23 | ["text-rendering", "animation", "/^background/"]
|
24 | ```
|
25 |
|
26 | The following patterns are considered violations:
|
27 |
|
28 |
|
29 | ```css
|
30 | a { text-rendering: optimizeLegibility; }
|
31 | ```
|
32 |
|
33 |
|
34 | ```css
|
35 | a {
|
36 | animation: my-animation 2s;
|
37 | color: pink;
|
38 | }
|
39 | ```
|
40 |
|
41 |
|
42 | ```css
|
43 | a { -webkit-animation: my-animation 2s; }
|
44 | ```
|
45 |
|
46 |
|
47 | ```css
|
48 | a { background: pink; }
|
49 | ```
|
50 |
|
51 |
|
52 | ```css
|
53 | a { background-size: cover; }
|
54 | ```
|
55 |
|
56 | The following patterns are _not_ considered violations:
|
57 |
|
58 |
|
59 | ```css
|
60 | a { color: pink; }
|
61 | ```
|
62 |
|
63 |
|
64 | ```css
|
65 | a { no-background: sure; }
|
66 | ```
|