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