.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / declaration-block-semicolon-newline-before / README.md
1 # declaration-block-semicolon-newline-before
2
3 Require a newline or disallow whitespace before the semicolons of declaration blocks.
4
5 ```css
6   a {
7     color: pink
8     ; top: 0;
9   } ↑
10 /** ↑
11  * The newline before this semicolon */
12 ```
13
14 This rule ignores semicolons that are preceded by Less mixins.
15
16 ## Options
17
18 `string`: `"always"|"always-multi-line"|"never-multi-line"`
19
20 ### `"always"`
21
22 There *must always* be a newline before the semicolons.
23
24 The following patterns are considered violations:
25
26 ```css
27 a { color: pink; }
28 ```
29
30 ```css
31 a {
32   color: pink; top: 0;
33 }
34 ```
35
36 The following patterns are *not* considered violations:
37
38 ```css
39 a { color: pink
40 ; }
41 ```
42
43 ```css
44 a {
45   color: pink
46   ; top: 0;
47 }
48 ```
49
50 ### `"always-multi-line"`
51
52 There *must always* be a newline before the semicolons in multi-line rules.
53
54 The following patterns are considered violations:
55
56 ```css
57 a {
58   color: pink; top: 0;
59 }
60 ```
61
62 The following patterns are *not* considered violations:
63
64 ```css
65 a { color: pink; }
66 ```
67
68 ```css
69 a { color: pink; top: 0; }
70 ```
71
72 ```css
73 a {
74   color: pink
75   ; top: 0;
76 }
77 ```
78
79 ### `"never-multi-line"`
80
81 There *must never* be whitespace before the semicolons in multi-line rules.
82
83 The following patterns are considered violations:
84
85 ```css
86 a {
87   color: pink
88   ; top: 0;
89 }
90 ```
91
92 The following patterns are *not* considered violations:
93
94 ```css
95 a { color: pink; }
96 ```
97
98 ```css
99 a { color: pink; top: 0; }
100 ```
101
102 ```css
103 a {
104   color: pink;
105   top: 0;
106 }
107 ```