UNPKG

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