Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dkrnl/stylelint-no-nested-media
Dissallow nested @media selectors
https://github.com/dkrnl/stylelint-no-nested-media
Last synced: 19 days ago
JSON representation
Dissallow nested @media selectors
- Host: GitHub
- URL: https://github.com/dkrnl/stylelint-no-nested-media
- Owner: dkrnl
- License: mit
- Created: 2020-07-07T09:16:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-07T09:24:01.000Z (over 4 years ago)
- Last Synced: 2024-10-15T09:32:21.748Z (about 1 month ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stylelint-no-nested-media
Disallow nested @media rulesFor example, the following patterns are considered violations:
```scss
@media (max-width: 600px) {
@media (min-width: 500px) { }
}
```The following patterns are not considered violations:
```scss
@media (min-width: 500px) and (max-width: 600px) { }
```## Installation
1. If you haven't, install [stylelint]:
```
npm install stylelint --save-dev
```2. Install `stylelint-no-nested-media`:
```
npm install stylelint-no-nested-media --save-dev
```## Usage
Add `stylelint-no-nested-media` to your stylelint config `plugins` array, then add rules you need to the rules list. All rules from stylelint-no-nested-media need to be namespaced with `pitcher`.
```json
{
"plugins": [
"stylelint-no-nested-media"
],
"rules": {
"pitcher/no-nested-media": true
}
}
```