.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / block-closing-brace-empty-line-before / README.md
1 # block-closing-brace-empty-line-before
2
3 Require or disallow an empty line before the closing brace of blocks.
4
5 ```css
6 a {
7   color: pink;
8   /* ← */
9 } /* ↑ */
10 /**  ↑
11  * This line */
12 ```
13
14 ## Options
15
16 `string`: `"always-multi-line"|"never"`
17
18 ### `always-multi-line`
19
20 The following patterns are considered violations:
21
22 ```css
23 a {
24   color: pink;
25 }
26 ```
27
28 The following patterns are *not* considered violations:
29
30 ```css
31 a {
32   color: pink;
33
34 }
35 ```
36
37 ```css
38 a { color: pink; }
39 ```
40
41 ### `never`
42
43 The following patterns are considered violations:
44
45 ```css
46 a {
47   color: pink;
48
49 }
50 ```
51
52 The following patterns are *not* considered violations:
53
54 ```css
55 a {
56   color: pink;
57 }
58 ```
59
60 ```css
61 a { color: pink; }
62 ```
63
64 ## Optional secondary options
65
66 ### `except: ["after-closing-brace"]`
67
68 When a rule is nested, `after-closing-brace` brace will reverse the primary option.
69
70 For example, with `"never"` and `except: ["after-closing-brace"]`:
71
72 The following patterns are considered violations:
73
74 ```css
75 @media print {
76
77   a {
78     color: aquamarine;
79   }
80 }
81 ```
82
83 ```css
84 @supports (animation-name: test) {
85
86   a {
87     color: aquamarine;
88   }
89 }
90 ```
91
92 ```css
93 @keyframes test {
94
95   100% {
96     color: aquamarine;
97   }
98 }
99 ```
100
101 The following patterns are *not* considered violations:
102
103 ```css
104 @media print {
105
106   a {
107     color: aquamarine;
108   }
109
110 }
111 ```
112
113 ```css
114 @font-face {
115   font-family: "MyFont";
116   src: url("myfont.woff2") format("woff2");
117 }
118 ```
119
120 ```css
121 @supports (animation-name: test) {
122
123   a {
124     color: aquamarine;
125   }
126
127 }
128 ```
129
130 ```css
131 @keyframes test {
132
133   100% {
134     color: aquamarine;
135   }
136
137 }
138 ```
139
140 For example, with `"always-multi-line"` and `except: ["after-closing-brace"]`:
141
142 The following patterns are considered violations:
143
144 ```css
145 @media print {
146
147   a {
148     color: aquamarine;
149
150   }
151
152 }
153 ```
154
155 ```css
156 @supports (animation-name: test) {
157
158   a {
159     color: aquamarine;
160
161   }
162
163 }
164 ```
165
166 ```css
167 @keyframes test {
168
169   100% {
170     color: aquamarine;
171
172   }
173
174 }
175 ```
176
177 The following patterns are *not* considered violations:
178
179 ```css
180 @media print {
181
182   a {
183     color: aquamarine;
184
185   }
186 }
187 ```
188
189 ```css
190 @font-face {
191   font-family: "MyFont";
192   src: url("myfont.woff2") format("woff2");
193
194 }
195 ```
196
197 ```css
198 @supports (animation-name: test) {
199
200   a {
201     color: aquamarine;
202
203   }
204 }
205 ```
206
207 ```css
208 @keyframes test {
209
210   100% {
211     color: aquamarine;
212
213   }
214 }
215 ```