media-type-no-deprecated
CSS / SCSS / LessCSS / SCSS / LessCSS / SCSS / Lesssuspiciousno fixdefault: offcss/stylelint-recommended
What it does
Section titled “What it does”Reports a deprecated media type (tv, handheld, projection, …) in @media.
Why it matters
Section titled “Why it matters”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.
Example
Section titled “Example”...@media tv, only handheld and (color), print {}...Configuration
Section titled “Configuration”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.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| stylelint | media-type-no-deprecated |
full |