PostCSS Decrease Specificity
PostCSS plugin that decreases the specificity of given selector.
Example
Complex example
Options
depth
: Number (default: 3)
Usage
const plugin = ; ;
Tests
$ npm test
Notes
- ⚠️ Use this plugin with caution, it may break your design.
- This plugin takes into consideration as
depth
only class selectors with descendant combinator, therefore,.a .b .c > .d tag .f{ decl:1 }
will become.b .c > .d tag .f{ decl:1 }
See PostCSS docs for examples for your environment.