UNPKG

1.6 kBMarkdownView Raw
1# at-rule-name-case
2
3Specify lowercase or uppercase for at-rules names.
4
5<!-- prettier-ignore -->
6```css
7 @media (min-width: 10px) {}
8/** ↑
9 * This at-rule name */
10```
11
12Only lowercase at-rule names are valid in SCSS.
13
14The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix some of the problems reported by this rule.
15
16## Options
17
18`string`: `"lower"|"upper"`
19
20### `"lower"`
21
22The following patterns are considered violations:
23
24<!-- prettier-ignore -->
25```css
26@Charset 'UTF-8';
27```
28
29<!-- prettier-ignore -->
30```css
31@cHarSeT 'UTF-8';
32```
33
34<!-- prettier-ignore -->
35```css
36@CHARSET 'UTF-8';
37```
38
39<!-- prettier-ignore -->
40```css
41@Media (min-width: 50em) {}
42```
43
44<!-- prettier-ignore -->
45```css
46@mEdIa (min-width: 50em) {}
47```
48
49<!-- prettier-ignore -->
50```css
51@MEDIA (min-width: 50em) {}
52```
53
54The following patterns are _not_ considered violations:
55
56<!-- prettier-ignore -->
57```css
58@charset 'UTF-8';
59```
60
61<!-- prettier-ignore -->
62```css
63@media (min-width: 50em) {}
64```
65
66### `"upper"`
67
68The following patterns are considered violations:
69
70<!-- prettier-ignore -->
71```css
72@Charset 'UTF-8';
73```
74
75<!-- prettier-ignore -->
76```css
77@cHarSeT 'UTF-8';
78```
79
80<!-- prettier-ignore -->
81```css
82@charset 'UTF-8';
83```
84
85<!-- prettier-ignore -->
86```css
87@Media (min-width: 50em) {}
88```
89
90<!-- prettier-ignore -->
91```css
92@mEdIa (min-width: 50em) {}
93```
94
95<!-- prettier-ignore -->
96```css
97@media (min-width: 50em) {}
98```
99
100The following patterns are _not_ considered violations:
101
102<!-- prettier-ignore -->
103```css
104@CHARSET 'UTF-8';
105```
106
107<!-- prettier-ignore -->
108```css
109@MEDIA (min-width: 50em) {}
110```