https://github.com/jacobdb/stylelint-rule-no-unnested-properties
Require that all properties in a top level rule are within & { ... }
https://github.com/jacobdb/stylelint-rule-no-unnested-properties
Last synced: 25 days ago
JSON representation
Require that all properties in a top level rule are within & { ... }
- Host: GitHub
- URL: https://github.com/jacobdb/stylelint-rule-no-unnested-properties
- Owner: JacobDB
- License: mit
- Created: 2017-04-10T13:30:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-10T13:50:15.000Z (about 9 years ago)
- Last Synced: 2025-10-30T19:38:03.793Z (8 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# stylelint-rule-no-unnested-properties
Stylelint plugin to require all properties within a top-level rule to be nested within `& { ... }`.
## Examples
### Invalid:
```css
.example-class {
font-size: 10px;
&.-bigger {
font-size: 14px;
}
}
```
### Valid:
```css
.example-class {
& {
font-size: 10px;
}
&.-bigger {
font-size: 14px;
}
}
```
## Install
```
$ npm install --save-dev stylelint-rule-no-unnested-properties
```
## Usage
Setup plugin in your [stylelint config](http://stylelint.io/user-guide/configuration/):
```json
{
"plugins": [
"stylelint-rule-no-unnested-properties"
],
"rules": {
"plugin/rule-no-unnested-properties": true
}
}
```
## License
MIT