Skip to content

media-type-no-deprecated

Reports a deprecated media type (tv, handheld, projection, …) in @media.

Media Queries Level 4 deprecates these types, and browsers match them as never true, so a block that depends on one never applies.

To fix, use a media feature (width, pointer) that tells the same thing, or delete the block.

Reported
...
@media tv, only handheld and (color), print {}
...
css:
lint:
rules:
media-type-no-deprecated:
level: warn # off (default), warn, error
options:
ignore: []
less:
lint:
rules:
media-type-no-deprecated:
level: warn # off (default), warn, error
options:
ignore: []
scss:
lint:
rules:
media-type-no-deprecated:
level: warn # off (default), warn, 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-type-no-deprecated 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-type-no-deprecated full