1 | # at-rule-name-newline-after
|
2 |
|
3 | Require a newline after at-rule names.
|
4 |
|
5 |
|
6 | ```css
|
7 | @media
|
8 | /*↑*/ (max-width: 600px) {}
|
9 | /** ↑
|
10 | * The newline after this at-rule name */
|
11 | ```
|
12 |
|
13 | ## Options
|
14 |
|
15 | `string`: `"always"|"always-multi-line"`
|
16 |
|
17 | ### `"always"`
|
18 |
|
19 | There _must always_ be a newline after at-rule names.
|
20 |
|
21 | The following patterns are considered violations:
|
22 |
|
23 |
|
24 | ```css
|
25 | @charset "UTF-8";
|
26 | ```
|
27 |
|
28 |
|
29 | ```css
|
30 | @media (min-width: 700px) and
|
31 | (orientation: landscape) {}
|
32 | ```
|
33 |
|
34 | The following patterns are _not_ considered violations:
|
35 |
|
36 |
|
37 | ```css
|
38 | @charset
|
39 | "UTF-8";
|
40 | ```
|
41 |
|
42 |
|
43 | ```css
|
44 | @import
|
45 | "x.css" screen and
|
46 | (orientation:landscape);
|
47 | ```
|
48 |
|
49 |
|
50 | ```css
|
51 | @media
|
52 | (min-width: 700px) and (orientation: landscape) {}
|
53 | ```
|
54 |
|
55 |
|
56 | ```css
|
57 | @media
|
58 | (min-width: 700px) and
|
59 | (orientation: landscape) {}
|
60 | ```
|
61 |
|
62 | ### `"always-multi-line"`
|
63 |
|
64 | There _must always_ be a newline after at-rule names in at-rules with multi-line parameters.
|
65 |
|
66 | The following patterns are considered violations:
|
67 |
|
68 |
|
69 | ```css
|
70 | @import "x.css" screen and
|
71 | (orientation:landscape);
|
72 | ```
|
73 |
|
74 |
|
75 | ```css
|
76 | @media (min-width: 700px) and
|
77 | (orientation: landscape) {}
|
78 | ```
|
79 |
|
80 | The following patterns are _not_ considered violations:
|
81 |
|
82 |
|
83 | ```css
|
84 | @charset "UTF-8";
|
85 | ```
|
86 |
|
87 |
|
88 | ```css
|
89 | @charset
|
90 | "UTF-8";
|
91 | ```
|
92 |
|
93 |
|
94 | ```css
|
95 | @import "x.css" screen and (orientation:landscape);
|
96 | ```
|
97 |
|
98 |
|
99 | ```css
|
100 | @media (min-width: 700px) and (orientation: landscape) {}
|
101 | ```
|
102 |
|
103 |
|
104 | ```css
|
105 | @media
|
106 | (min-width: 700px) and
|
107 | (orientation: landscape) {}
|
108 | ```
|