@csstools/stylelint-no-at-nest-rule
v4.0.0
Published
Do not allow @nest rules
Downloads
2,658
Readme
@csstools/stylelint-no-at-nest-rule
Prevent usage of @nest
in CSS.
/* valid */
.element {
article & {}
}
/* invalid */
.element {
@nest article & {}
}
The CSS Nesting specification has changed and @nest
is no longer required and has been removed from the specification.
Since it will never be valid CSS in browsers it is important to migrate away from it.
Valid CSS :
.element {
article {}
article & {}
}
Invalid CSS :
.foo {
@nest article {}
@nest article & {}
}
Usage
npm install --save-dev @csstools/stylelint-no-at-nest-rule
// stylelint.config.js
module.exports = {
plugins: [
"@csstools/stylelint-no-at-nest-rule",
],
rules: {
"@csstools/stylelint-no-at-nest-rule": true,
},
}