UNPKG

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