Skip to content

media-feature-name-no-unknown

Reports a media feature name in @media that is not a CSS one; vendor-prefixed names are not reported.

An unknown media feature makes the query false, so the block is never applied, and no error tells you.

To fix, correct the name.

Reported
...
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; }
}
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.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
stylelint media-feature-name-no-unknown full