An open API service indexing awesome lists of open source software.

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 & { ... }

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