1 | # color-hex-case
|
2 |
|
3 | Specify lowercase or uppercase for hex colors.
|
4 |
|
5 |
|
6 | ```css
|
7 | a { color: #fff }
|
8 | /** ↑
|
9 | * This hex color */
|
10 | ```
|
11 |
|
12 | The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.
|
13 |
|
14 | ## Options
|
15 |
|
16 | `string`: `"lower"|"upper"`
|
17 |
|
18 | ### `"lower"`
|
19 |
|
20 | The following patterns are considered violations:
|
21 |
|
22 |
|
23 | ```css
|
24 | a { color: #FFF; }
|
25 | ```
|
26 |
|
27 | The following patterns are _not_ considered violations:
|
28 |
|
29 |
|
30 | ```css
|
31 | a { color: #000; }
|
32 | ```
|
33 |
|
34 |
|
35 | ```css
|
36 | a { color: #fff; }
|
37 | ```
|
38 |
|
39 | ### `"upper"`
|
40 |
|
41 | The following patterns are considered violations:
|
42 |
|
43 |
|
44 | ```css
|
45 | a { color: #fff; }
|
46 | ```
|
47 |
|
48 | The following patterns are _not_ considered violations:
|
49 |
|
50 |
|
51 | ```css
|
52 | a { color: #000; }
|
53 | ```
|
54 |
|
55 |
|
56 | ```css
|
57 | a { color: #FFF; }
|
58 | ```
|