UNPKG

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