1 | # selector-type-case
|
2 |
|
3 | Specify lowercase or uppercase for type selectors.
|
4 |
|
5 |
|
6 | ```css
|
7 | a {}
|
8 | /** ↑
|
9 | * This is type 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 {}
|
25 | ```
|
26 |
|
27 |
|
28 | ```css
|
29 | LI {}
|
30 | ```
|
31 |
|
32 | The following patterns are _not_ considered violations:
|
33 |
|
34 |
|
35 | ```css
|
36 | a {}
|
37 | ```
|
38 |
|
39 |
|
40 | ```css
|
41 | li {}
|
42 | ```
|
43 |
|
44 | ### `"upper"`
|
45 |
|
46 | The following patterns are considered violations:
|
47 |
|
48 |
|
49 | ```css
|
50 | a {}
|
51 | ```
|
52 |
|
53 |
|
54 | ```css
|
55 | li {}
|
56 | ```
|
57 |
|
58 | The following patterns are _not_ considered violations:
|
59 |
|
60 |
|
61 | ```css
|
62 | A {}
|
63 | ```
|
64 |
|
65 |
|
66 | ```css
|
67 | LI {}
|
68 | ```
|
69 |
|
70 | ## Optional secondary options
|
71 |
|
72 | ### `ignoreTypes: ["/regex/", "non-regex"]`
|
73 |
|
74 | Given:
|
75 |
|
76 | ```
|
77 | ["$childClass", "/(p|P)arent.*/"]
|
78 | ```
|
79 |
|
80 | The following patterns are _not_ considered violations:
|
81 |
|
82 |
|
83 | ```css
|
84 | myParentClass {
|
85 | color: pink;
|
86 | }
|
87 |
|
88 | $childClass {
|
89 | color: pink;
|
90 | }
|
91 | ```
|