.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / property-no-unknown / README.md
1 # property-no-unknown
2
3 Disallow unknown properties.
4
5 ```css
6 a { heigth: 100%; }
7 /** ↑
8  * These properties */
9 ```
10
11 This rule considers properties defined in the [CSS Specifications and browser specific properties](https://github.com/betit/known-css-properties#source) to be known.
12
13 This rule ignores variables (`$sass`, `@less`, `--custom-property`).
14
15 This rule ignores vendor-prefixed properties (e.g., `-moz-align-self`, `-webkit-align-self`).
16 Use option `checkPrefixed` described below to turn on checking of vendor-prefixed properties.
17
18 ## Options
19
20 ### `true`
21
22 The following patterns are considered violations:
23
24 ```css
25 a {
26   colr: blue;
27 }
28 ```
29
30 ```css
31 a {
32   my-property: 1;
33 }
34 ```
35
36 The following patterns are *not* considered violations:
37
38 ```css
39 a {
40   color: green;
41 }
42 ```
43
44 ```css
45 a {
46   fill: black;
47 }
48 ```
49
50 ```css
51 a {
52   -moz-align-self: center;
53 }
54 ```
55
56 ```css
57 a {
58   -webkit-align-self: center;
59 }
60 ```
61
62 ```css
63 a {
64   align-self: center;
65 }
66 ```
67
68 ## Optional secondary options
69
70 ### `ignoreProperties: ["/regex/", "string"]`
71
72 Given:
73
74 ```js
75 ["/^my-/", "custom"]
76 ```
77
78 The following patterns are *not* considered violations:
79
80 ```css
81 a {
82   my-property: 10px;
83 }
84 ```
85
86 ```css
87 a {
88   my-other-property: 10px;
89 }
90 ```
91
92 ```css
93 a {
94   custom: 10px;
95 }
96 ```
97
98 ### `checkPrefixed: true | false` (default: `false`)
99
100 If `true`, this rule will check vendor-prefixed properties.
101
102 For example with `true`:
103
104 The following patterns are *not* considered violations:
105
106 ```css
107 a {
108   -webkit-overflow-scrolling: auto;
109 }
110 ```
111
112 ```css
113 a {
114   -moz-box-flex: 0;
115 }
116 ```
117
118 The following patterns are considered  violations:
119
120 ```css
121 a {
122   -moz-align-self: center;
123 }
124 ```
125
126 ```css
127 a {
128   -moz-overflow-scrolling: center;
129 }
130 ```