Skip to content

Files

Latest commit

 

History

History
37 lines (24 loc) · 797 Bytes

declaration-no-important.md

File metadata and controls

37 lines (24 loc) · 797 Bytes

Pattern: Use of !important in declaration

Issue: -

Description

This rule disallows !important within declarations.

If you always want !important in your declarations, e.g. if you're writing user styles, you can safely add them using postcss-safe-important.

Examples

The following patterns are considered violations:

a { color: pink !important; }
/**             ↑
 * This !important */
a { color: pink ! important; }
a { color: pink!important; }

The following patterns are not considered violations:

a { color: pink; }

Further Reading