UNPKG

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