.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / declaration-property-unit-blacklist / README.md
1 # declaration-property-unit-blacklist
2
3 Specify a blacklist of disallowed property and unit pairs within declarations.
4
5 ```css
6 a { width: 100px; }
7 /** ↑         ↑
8  * These properties and these units */
9 ```
10
11 ## Options
12
13 `object`: `{
14   "unprefixed-property-name": ["array", "of", "units"]
15 }`
16
17 If a property name is surrounded with `"/"` (e.g. `"/^animation/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^animation/` will match `animation`, `animation-duration`, `animation-timing-function`, etc.
18
19 Given:
20
21 ```js
22 {
23   "font-size": ["em", "px"],
24   "/^animation/": ["s"]
25 }
26 ```
27
28 The following patterns are considered violations:
29
30 ```css
31 a { font-size: 1em; }
32 ```
33
34 ```css
35 a { animation: animation-name 5s ease; }
36 ```
37
38 ```css
39 a { -webkit-animation: animation-name 5s ease; }
40 ```
41
42 ```css
43 a { animation-duration: 5s; }
44 ```
45
46 The following patterns are *not* considered violations:
47
48 ```css
49 a { font-size: 1.2rem; }
50 ```
51
52 ```css
53 a { height: 100px; }
54 ```
55
56 ```css
57 a { animation: animation-name 500ms ease; }
58 ```
59
60 ```css
61 a { -webkit-animation: animation-name 500ms ease; }
62 ```
63
64 ```css
65 a { animation-duration: 500ms; }
66 ```