noDeprecatedMediaType
Summary
Section titled “Summary”- Rule available since:
v2.3.14 - Diagnostic Category:
lint/suspicious/noDeprecatedMediaType - This rule is recommended, meaning it is enabled by default.
- This rule doesn’t have a fix.
- The default severity of this rule is warning.
- Sources:
- Same as
media-type-no-deprecated
- Same as
How to configure
Section titled “How to configure”{ "linter": { "rules": { "suspicious": { "noDeprecatedMediaType": "error" } } }}Description
Section titled “Description”Disallow deprecated media types.
Several media types defined in earlier specifications have been deprecated and should no longer be used. The deprecated media types are still recognized, but they match nothing.
For details on media types, see the Media Queries Level 5 specification.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”@media tv {}code-block.css:1:8 lint/suspicious/noDeprecatedMediaType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Unexpected deprecated media type: tv
> 1 │ @media tv {}
│ ^^
2 │
ℹ Deprecated media types are recognized but match nothing; prefer using media features or recommended media types.
ℹ Recommended media types include:
- all
- print
- screen
@media handheld and (min-width: 480px) {}code-block.css:1:8 lint/suspicious/noDeprecatedMediaType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Unexpected deprecated media type: handheld
> 1 │ @media handheld and (min-width: 480px) {}
│ ^^^^^^^^
2 │
ℹ Deprecated media types are recognized but match nothing; prefer using media features or recommended media types.
ℹ Recommended media types include:
- all
- print
- screen
@media screen {}@media print and (min-resolution: 300dpi) {}Options
Section titled “Options”Media types to allow (case-insensitive).
{ "linter": { "rules": { "suspicious": { "noDeprecatedMediaType": { "options": { "allow": [ "tv", "speech" ] } } } } }}@media tv {}@media speech {}Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.