UNPKG

796 BMarkdownView Raw
1# declaration-no-important
2
3Disallow `!important` within declarations.
4
5<!-- prettier-ignore -->
6```css
7a { color: pink !important; }
8/** ↑
9 * This !important */
10```
11
12If 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
18The following patterns are considered violations:
19
20<!-- prettier-ignore -->
21```css
22a { color: pink !important; }
23```
24
25<!-- prettier-ignore -->
26```css
27a { color: pink ! important; }
28```
29
30<!-- prettier-ignore -->
31```css
32a { color: pink!important; }
33```
34
35The following patterns are _not_ considered violations:
36
37<!-- prettier-ignore -->
38```css
39a { color: pink; }
40```