.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / block-opening-brace-space-before / README.md
1 # block-opening-brace-space-before
2
3 Require a single space or disallow whitespace before the opening brace of blocks.
4
5 ```css
6   a { color: pink; }
7 /** ↑
8  * The space before this brace */
9 ```
10
11 ## Options
12
13 `string`: `"always"|"never"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line"`
14
15 ### `"always"`
16
17 There *must always* be a single space before the opening brace.
18
19 The following patterns are considered violations:
20
21 ```css
22 a{ color: pink; }
23 ```
24
25 ```css
26 a
27 { color: pink; }
28 ```
29
30 The following patterns are *not* considered violations:
31
32 ```css
33 a { color: pink; }
34 ```
35
36 ```css
37 a {
38 color: pink; }
39 ```
40
41 ### `"never"`
42
43 There *must never* be whitespace before the opening brace.
44
45 The following patterns are considered violations:
46
47 ```css
48 a { color: pink; }
49 ```
50
51 ```css
52 a
53 { color: pink; }
54 ```
55
56 The following patterns are *not* considered violations:
57
58 ```css
59 a{ color: pink; }
60 ```
61
62 ```css
63 a{
64 color: pink; }
65 ```
66
67 ### `"always-single-line"`
68
69 There *must always* be a single space before the opening brace in single-line blocks.
70
71 The following patterns are considered violations:
72
73 ```css
74 a{ color: pink; }
75 ```
76
77 The following patterns are *not* considered violations:
78
79 ```css
80 a { color: pink; }
81 ```
82
83 ```css
84 a{
85 color: pink; }
86 ```
87
88 ### `"never-single-line"`
89
90 There *must never* be whitespace before the opening brace in single-line blocks.
91
92 The following patterns are considered violations:
93
94 ```css
95 a { color: pink; }
96 ```
97
98 The following patterns are *not* considered violations:
99
100 ```css
101 a{ color: pink; }
102 ```
103
104 ```css
105 a {
106 color: pink; }
107 ```
108
109 ### `"always-multi-line"`
110
111 There *must always* be a single space before the opening brace in multi-line blocks.
112
113 The following patterns are considered violations:
114
115 ```css
116 a{
117 color: pink; }
118 ```
119
120 The following patterns are *not* considered violations:
121
122 ```css
123 a{ color: pink; }
124 ```
125
126 ```css
127 a {
128 color: pink; }
129 ```
130
131 ### `"never-multi-line"`
132
133 There *must never* be whitespace before the opening brace in multi-line blocks.
134
135 The following patterns are considered violations:
136
137 ```css
138 a {
139 color: pink; }
140 ```
141
142 The following patterns are *not* considered violations:
143
144 ```css
145 a { color: pink; }
146 ```
147
148 ```css
149 a{
150 color: pink;}
151 ```
152
153 ## Optional secondary options
154
155 ### `ignoreAtRules: ["/regex/", "non-regex"]`
156
157 Given:
158
159 ```js
160 ["/fo/"]
161 ```
162
163 The following patterns are *not* considered violations:
164
165 ```css
166 @for ...
167 {}
168 ```
169
170 ```css
171 @for ...{}
172 ```