media-feature-name-no-unknown
CSS / SCSS / LessCSS / SCSS / LessCSS / SCSS / Lesscorrectnessno fixdefault: warncss/stylelint-recommended
What it does
Section titled “What it does”Reports a media feature name in @media that is not a CSS one; vendor-prefixed names are not reported.
Why it matters
Section titled “Why it matters”An unknown media feature makes the query false, so the block is never applied, and no error tells you.
To fix, correct the name.
Example
Section titled “Example”... g { x: y }... @media (a) { top: 0; }...}@media (a) { top: 0; }@media (b) { top: 0; }... --b: 2;... --c: 3;... @media (a) { top: 0; } @media (b) { top: 0; }}Configuration
Section titled “Configuration”css: lint: rules: media-feature-name-no-unknown: level: warn # off, warn (default), error options: ignore: []less: lint: rules: media-feature-name-no-unknown: level: warn # off, warn (default), error options: ignore: []scss: lint: rules: media-feature-name-no-unknown: level: warn # off, warn (default), error options: ignore: []| Option | Type | Default | Description |
|---|---|---|---|
ignore |
list | [] |
Names left out: names, or /regex/. |
Enabled by the presets: css/stylelint-recommended.
Suppress one line with sudsy-disable-next-line media-feature-name-no-unknown in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| stylelint | media-feature-name-no-unknown |
full |