Skip to content

noDeprecatedMediaType

biome.json
{
"linter": {
"rules": {
"suspicious": {
"noDeprecatedMediaType": "error"
}
}
}
}

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.

@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) {}

Media types to allow (case-insensitive).

biome.json
{
"linter": {
"rules": {
"suspicious": {
"noDeprecatedMediaType": {
"options": {
"allow": [
"tv",
"speech"
]
}
}
}
}
}
}
@media tv {}
@media speech {}