mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 06:37:17 -04:00
58 lines
902 B
Markdown
58 lines
902 B
Markdown
|
# declaration-bang-space-before
|
||
|
|
||
|
Require a single space or disallow whitespace before the bang of declarations.
|
||
|
|
||
|
```css
|
||
|
a { color: pink !important; }
|
||
|
/** ↑
|
||
|
* The space before this exclamation mark */
|
||
|
```
|
||
|
|
||
|
## Options
|
||
|
|
||
|
`string`: `"always"|"never"`
|
||
|
|
||
|
### `"always"`
|
||
|
|
||
|
There *must always* be a single space before the bang.
|
||
|
|
||
|
The following patterns are considered warnings:
|
||
|
|
||
|
```css
|
||
|
a { color: pink!important; }
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a { color: pink ! important; }
|
||
|
```
|
||
|
|
||
|
The following patterns are *not* considered warnings:
|
||
|
|
||
|
```css
|
||
|
a { color: pink !important; }
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a { color:pink ! important; }
|
||
|
```
|
||
|
|
||
|
### `"never"`
|
||
|
|
||
|
There *must never* be whitespace before the bang.
|
||
|
|
||
|
The following patterns are considered warnings:
|
||
|
|
||
|
```css
|
||
|
a { color : pink !important; }
|
||
|
```
|
||
|
|
||
|
The following patterns are *not* considered warnings:
|
||
|
|
||
|
```css
|
||
|
a { color: pink!important; }
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a { color: pink! important; }
|
||
|
```
|