UNPKG

1.31 kBMarkdownView Raw
1# declaration-bang-space-after
2
3Require a single space or disallow whitespace after the bang of declarations.
4
5<!-- prettier-ignore -->
6```css
7a { color: pink !important; }
8/** ↑
9 * The space after this exclamation mark */
10```
11
12The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.
13
14## Options
15
16`string`: `"always"|"never"`
17
18### `"always"`
19
20There _must always_ be a single space after the bang.
21
22The following patterns are considered violations:
23
24<!-- prettier-ignore -->
25```css
26a { color: pink !important; }
27```
28
29<!-- prettier-ignore -->
30```css
31a { color: pink !important; }
32```
33
34The following patterns are _not_ considered violations:
35
36<!-- prettier-ignore -->
37```css
38a { color: pink ! important; }
39```
40
41<!-- prettier-ignore -->
42```css
43a { color: pink! important; }
44```
45
46### `"never"`
47
48There _must never_ be whitespace after the bang.
49
50The following patterns are considered violations:
51
52<!-- prettier-ignore -->
53```css
54a { color: pink ! important; }
55```
56
57<!-- prettier-ignore -->
58```css
59a { color: pink! important; }
60```
61
62The following patterns are _not_ considered violations:
63
64<!-- prettier-ignore -->
65```css
66a { color: pink !important; }
67```
68
69<!-- prettier-ignore -->
70```css
71a { color:pink!important; }
72```