.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / value-keyword-case / README.md
1 # value-keyword-case
2
3 Specify lowercase or uppercase for keywords values.
4
5 ```css
6     a { display: block; }
7 /**              ↑
8  *    These values */
9 ```
10
11 This rule ignores [`<custom-idents>`](https://developer.mozilla.org/en/docs/Web/CSS/custom-ident) of known properties. Values which are paired with non-properties (e.g. `$vars` and custom properties), and do not conform to the primary option, can be ignored using the `ignoreValues: []` secondary option.
12
13 ## Options
14
15 `string`: `"lower"|"upper"`
16
17 ### `"lower"`
18
19 The following patterns are considered violations:
20
21 ```css
22 a {
23   display: Block;
24 }
25 ```
26
27 ```css
28 a {
29   display: bLoCk;
30 }
31 ```
32
33 ```css
34 a {
35   display: BLOCK;
36 }
37 ```
38
39 ```css
40 a {
41   transition: -WEBKIT-TRANSFORM 2s;
42 }
43 ```
44
45 The following patterns are *not* considered violations:
46
47 ```css
48 a {
49   display: block;
50 }
51 ```
52
53 ```css
54 a {
55   transition: -webkit-transform 2s;
56 }
57 ```
58
59 ### `"upper"`
60
61 The following patterns are considered violations:
62
63 ```css
64 a {
65   display: Block;
66 }
67 ```
68
69 ```css
70 a {
71   display: bLoCk;
72 }
73 ```
74
75 ```css
76 a {
77   display: block;
78 }
79 ```
80
81 ```css
82 a {
83   transition: -webkit-transform 2s;
84 }
85 ```
86
87 The following patterns are *not* considered violations:
88
89 ```css
90 a {
91   display: BLOCK;
92 }
93 ```
94
95 ```css
96 a {
97   transition: -WEBKIT-TRANSFORM 2s;
98 }
99 ```
100
101 ## Optional secondary options
102
103 ### `ignoreKeywords: ["/regex/", "non-regex"]`
104
105 Ignore case of keywords values.
106
107 For example, with `"lower"`.
108
109 Given:
110
111 ```js
112 ["Block", "/^(f|F)lex$/"]
113 ```
114
115 The following patterns are considered violations:
116
117 ```css
118 a {
119   display: bLoCk;
120 }
121 ```
122
123 ```css
124 a {
125   display: BLOCK;
126 }
127 ```
128
129 ```css
130 a {
131   display: fLeX;
132 }
133 ```
134
135 ```css
136 a {
137   display: FLEX;
138 }
139 ```
140
141 The following patterns are *not* considered violations:
142
143 ```css
144 a {
145   display: block;
146 }
147 ```
148
149 ```css
150 a {
151   display: Block;
152 }
153 ```
154
155 ```css
156 a {
157   display: flex;
158 }
159 ```
160
161 ```css
162 a {
163   display: Flex;
164 }
165 ```
166
167 ### `ignoreProperties: ["/regex/", "non-regex"]`
168
169 Ignore case of the values of the listed properties.
170
171 For example, with `"lower"`.
172
173 ```js
174 ["/^(b|B)ackground$/", "display"]
175 ```
176
177 The following patterns are considered violations:
178
179 ```css
180 a {
181   text-align: LEFT;
182 }
183 ```
184
185 ```css
186 a {
187   text-align: Left;
188 }
189 ```
190
191 The following patterns are *not* considered violations:
192
193 ```css
194 a {
195   display: bloCk;
196 }
197 ```
198
199 ```css
200 a {
201   display: BloCk;
202 }
203 ```
204
205 ```css
206 a {
207   display: BLOCK;
208 }
209 ```
210
211 ```css
212 a {
213   display: block;
214 }
215 ```
216
217 ```css
218 a {
219   background: Red;
220 }
221 ```
222
223 ```css
224 a {
225   Background: deepPink;
226 }
227 ```