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