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