UNPKG

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