@csstools/stylelint-no-at-nest-rule

4.0.0 • Public • Published

version

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,
	},
}

/@csstools/stylelint-no-at-nest-rule/

    Package Sidebar

    Install

    npm i @csstools/stylelint-no-at-nest-rule

    Weekly Downloads

    487

    Version

    4.0.0

    License

    MIT-0

    Unpacked Size

    4.26 kB

    Total Files

    4

    Last publish

    Collaborators

    • romainmenke
    • alaguna
    • jonathantneal