1 | # selector-pseudo-element-case
|
2 |
|
3 | Specify lowercase or uppercase for pseudo-element selectors.
|
4 |
|
5 |
|
6 | ```css
|
7 | a::before {}
|
8 | /** ↑
|
9 | * This pseudo-element 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:Before {}
|
25 | ```
|
26 |
|
27 |
|
28 | ```css
|
29 | a:bEfOrE {}
|
30 | ```
|
31 |
|
32 |
|
33 | ```css
|
34 | a:BEFORE {}
|
35 | ```
|
36 |
|
37 |
|
38 | ```css
|
39 | a::Before {}
|
40 | ```
|
41 |
|
42 |
|
43 | ```css
|
44 | a::bEfOrE {}
|
45 | ```
|
46 |
|
47 |
|
48 | ```css
|
49 | a::BEFORE {}
|
50 | ```
|
51 |
|
52 |
|
53 | ```css
|
54 | input::-MOZ-PLACEHOLDER {}
|
55 | ```
|
56 |
|
57 | The following patterns are _not_ considered violations:
|
58 |
|
59 |
|
60 | ```css
|
61 | a:before {}
|
62 | ```
|
63 |
|
64 |
|
65 | ```css
|
66 | a::before {}
|
67 | ```
|
68 |
|
69 |
|
70 | ```css
|
71 | input::-moz-placeholder {}
|
72 | ```
|
73 |
|
74 | ### `"upper"`
|
75 |
|
76 | The following patterns are considered violations:
|
77 |
|
78 |
|
79 | ```css
|
80 | a:Before {}
|
81 | ```
|
82 |
|
83 |
|
84 | ```css
|
85 | a:bEfOrE {}
|
86 | ```
|
87 |
|
88 |
|
89 | ```css
|
90 | a:BEFORE {}
|
91 | ```
|
92 |
|
93 |
|
94 | ```css
|
95 | a::Before {}
|
96 | ```
|
97 |
|
98 |
|
99 | ```css
|
100 | a::bEfOrE {}
|
101 | ```
|
102 |
|
103 |
|
104 | ```css
|
105 | a::before {}
|
106 | ```
|
107 |
|
108 |
|
109 | ```css
|
110 | input::-moz-placeholder {}
|
111 | ```
|
112 |
|
113 | The following patterns are _not_ considered violations:
|
114 |
|
115 |
|
116 | ```css
|
117 | a:BEFORE {}
|
118 | ```
|
119 |
|
120 |
|
121 | ```css
|
122 | a::BEFORE {}
|
123 | ```
|
124 |
|
125 |
|
126 | ```css
|
127 | input::-MOZ-PLACEHOLDER {}
|
128 | ```
|