Перейти к содержимому

noDeprecatedMediaType

Это содержимое пока не доступно на вашем языке.

biome.json
{
"linter": {
"rules": {
"nursery": {
"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/nursery/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.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Recommended media types include:

- all
- print
- screen

@media handheld and (min-width: 480px) {}
code-block.css:1:8 lint/nursery/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.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

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": {
"nursery": {
"noDeprecatedMediaType": {
"options": {
"allow": [
"tv",
"speech"
]
}
}
}
}
}
}
@media tv {}
@media speech {}