minor adjustment to readme
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / unit-no-unknown / README.md
1 # unit-no-unknown
2
3 Disallow unknown units.
4
5 ```css
6 a { width: 100pixels; }
7 /**           ↑
8  *  These units */
9 ```
10
11 This rule considers units defined in the CSS Specifications, up to and including Editor's Drafts, to be known.
12
13 ## Options
14
15 ### `true`
16
17 The following patterns are considered violations:
18
19 ```css
20 a {
21   width: 10pixels;
22 }
23 ```
24
25 ```css
26 a {
27   width: calc(10px + 10pixels);
28 }
29 ```
30
31 The following patterns are *not* considered violations:
32
33 ```css
34 a {
35   width: 10px;
36 }  
37 ```
38
39 ```css
40 a {
41   width: 10Px;
42 }  
43 ```
44
45 ```css
46 a {
47   width: 10pX;
48 }  
49 ```
50
51 ```css
52 a {
53   width: calc(10px + 10px);
54 }
55 ```
56
57 ## Optional secondary options
58
59 ### `ignoreUnits: ["/regex/", "string"]`
60
61 Given:
62
63 ```js
64 ["/^my-/", "custom"]
65 ```
66
67 The following patterns are *not* considered violations:
68
69 ```css
70 a {
71   width: 10custom;
72 }
73 ```
74
75 ```css
76 a {
77   width: 10my-unit;
78 }
79 ```
80
81 ```css
82 a {
83   width: 10my-other-unit;
84 }
85 ```