1 | # declaration-no-important
|
2 |
|
3 | Disallow `!important` within declarations.
|
4 |
|
5 |
|
6 | ```css
|
7 | a { color: pink !important; }
|
8 | /** ↑
|
9 | * This !important */
|
10 | ```
|
11 |
|
12 | If you always want `!important` in your declarations, e.g. if you're writing [user styles](https://userstyles.org/), you can _safely_ add them using [`postcss-safe-important`](https://github.com/crimx/postcss-safe-important).
|
13 |
|
14 | ## Options
|
15 |
|
16 | ### `true`
|
17 |
|
18 | The following patterns are considered violations:
|
19 |
|
20 |
|
21 | ```css
|
22 | a { color: pink !important; }
|
23 | ```
|
24 |
|
25 |
|
26 | ```css
|
27 | a { color: pink ! important; }
|
28 | ```
|
29 |
|
30 |
|
31 | ```css
|
32 | a { color: pink!important; }
|
33 | ```
|
34 |
|
35 | The following patterns are _not_ considered violations:
|
36 |
|
37 |
|
38 | ```css
|
39 | a { color: pink; }
|
40 | ```
|