.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / property-whitelist / README.md
1 # property-whitelist
2
3 Specify a whitelist of allowed properties.
4
5 ```css
6 a { display: block; }
7 /** ↑
8  * These properties */
9 ```
10
11 This rule ignores variables (`$sass`, `@less`, `--custom-property`).
12
13 ## Options
14
15 `array|string`: `["array", "of", "unprefixed", "properties" or "regex"]|"property"|"/regex/"`
16
17 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.
18
19 Given:
20
21 ```js
22 ["display", "animation", "/^background/"]
23 ```
24
25 The following patterns are considered violations:
26
27 ```css
28 a { color: pink; }
29 ```
30
31 ```css
32 a {
33   animation: my-animation 2s;
34   color: pink;
35 }
36 ```
37
38 ```css
39 a { borkgrund: orange; }
40 ```
41
42 The following patterns are *not* considered violations:
43
44 ```css
45 a { display: block; }
46 ```
47
48 ```css
49 a { -webkit-animation: my-animation 2s; }
50 ```
51
52 ```css
53 a {
54   animation: my-animation 2s;
55   -webkit-animation: my-animation 2s;
56   display: block;
57 }
58 ```
59
60 ```css
61 a { background: pink; }
62 ```
63
64 ```css
65 a { background-color: pink; }
66 ```