stylelint-no-undoing-styles
v1.2.1
Published
This plugin finds any usage of undoing styles in your (s)css files and reports them
Downloads
4
Maintainers
Readme
stylelint-no-undoing-styles
This plugin finds any usage of undoing styles in your (s)css files and reports them.
Install
npm install stylelint-no-undoing-styles --save-dev
Usage
After that add this plugin to your stylelint plugins and include the rule:
"plugins": [
"stylelint-no-undoing-styles"
],
"rules": {
"plugin/no-undoing-styles": true
}
Details
// _button.scss
.fancy-button {
margin-bottom: 2em;
}
// _landingpage.scss
.fancy_button {
margin-bottom: 0;
}
/** ^^^
* Undoing styles from _button.scss */
Be cautions with warnings: not every warning is truthy. The static analysis might have false positives or reports neccessary resetting declarations.
Options
true
The following pattern is considered warning:
// _button.scss
.fancy-button {
border: 0.5em solid #F00;
}
// _landingpage.scss
.fancy_button {
border: none;
}
Resetting values (not always):
- 0
- auto
- none
- baseline
- initial
License
MIT