UNPKG

911 BMarkdownView Raw
1# color-hex-case
2
3Specify lowercase or uppercase for hex colors.
4
5<!-- prettier-ignore -->
6```css
7a { color: #fff }
8/** ↑
9 * This hex color */
10```
11
12The [`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
20The following patterns are considered violations:
21
22<!-- prettier-ignore -->
23```css
24a { color: #FFF; }
25```
26
27The following patterns are _not_ considered violations:
28
29<!-- prettier-ignore -->
30```css
31a { color: #000; }
32```
33
34<!-- prettier-ignore -->
35```css
36a { color: #fff; }
37```
38
39### `"upper"`
40
41The following patterns are considered violations:
42
43<!-- prettier-ignore -->
44```css
45a { color: #fff; }
46```
47
48The following patterns are _not_ considered violations:
49
50<!-- prettier-ignore -->
51```css
52a { color: #000; }
53```
54
55<!-- prettier-ignore -->
56```css
57a { color: #FFF; }
58```