1 | # selector-pseudo-class-case
|
2 |
|
3 | Specify lowercase or uppercase for pseudo-class selectors.
|
4 |
|
5 |
|
6 | ```css
|
7 | a:hover {}
|
8 | /** ↑
|
9 | * This pseudo-class selector */
|
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:Hover {}
|
25 | ```
|
26 |
|
27 |
|
28 | ```css
|
29 | a:hOvEr {}
|
30 | ```
|
31 |
|
32 |
|
33 | ```css
|
34 | a:HOVER {}
|
35 | ```
|
36 |
|
37 |
|
38 | ```css
|
39 | :ROOT {}
|
40 | ```
|
41 |
|
42 |
|
43 | ```css
|
44 | :-MS-INPUT-PLACEHOLDER {}
|
45 | ```
|
46 |
|
47 | The following patterns are _not_ considered violations:
|
48 |
|
49 |
|
50 | ```css
|
51 | a:hover {}
|
52 | ```
|
53 |
|
54 |
|
55 | ```css
|
56 | :root {}
|
57 | ```
|
58 |
|
59 |
|
60 | ```css
|
61 | :-ms-input-placeholder {}
|
62 | ```
|
63 |
|
64 | ### `"upper"`
|
65 |
|
66 | The following patterns are considered violations:
|
67 |
|
68 |
|
69 | ```css
|
70 | a:Hover {}
|
71 | ```
|
72 |
|
73 |
|
74 | ```css
|
75 | a:hOvEr {}
|
76 | ```
|
77 |
|
78 |
|
79 | ```css
|
80 | a:hover {}
|
81 | ```
|
82 |
|
83 |
|
84 | ```css
|
85 | :root {}
|
86 | ```
|
87 |
|
88 |
|
89 | ```css
|
90 | :-ms-input-placeholder {}
|
91 | ```
|
92 |
|
93 | The following patterns are _not_ considered violations:
|
94 |
|
95 |
|
96 | ```css
|
97 | a:HOVER {}
|
98 | ```
|
99 |
|
100 |
|
101 | ```css
|
102 | :ROOT {}
|
103 | ```
|
104 |
|
105 |
|
106 | ```css
|
107 | :-MS-INPUT-PLACEHOLDER {}
|
108 | ```
|