src/content/docs/linter/rules/no-deprecated-media-type.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="CSS" icon="seti:css"> :::caution This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. ::: ## Summary - Rule available since: `v2.3.14` - Diagnostic Category: [`lint/nursery/noDeprecatedMediaType`](/reference/diagnostics#diagnostic-category) - This rule doesn't have a fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - Sources: - Same as [`media-type-no-deprecated`](https://github.com/stylelint/stylelint/blob/main/lib/rules/media-type-no-deprecated/README.md){
"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 {}
@media handheld and (min-width: 480px) {}
@media screen {}
@media print and (min-resolution: 300dpi) {}
allowMedia types to allow (case-insensitive).
{
"linter": {
"rules": {
"nursery": {
"noDeprecatedMediaType": {
"options": {
"allow": [
"tv",
"speech"
]
}
}
}
}
}
}
@media tv {}
@media speech {}