media-type-no-deprecated
Disallow deprecated media types.
@media tv {}
/** ↑
* Deprecated media type */
Use this rule to avoid @media blocks that never apply. Browsers accept deprecated media types as valid but match nothing. They are:
auralbrailleembossedhandheldprojectionspeechttytv
Currently, the recommended media types are:
allscreenprint
The deprecated media types were removed because they were either never widely implemented or their use cases are now better handled by media features rather than broad device categories.
This rule supports 1 message argument: the deprecated media type.
Options
true
{
"media-type-no-deprecated": true
}
The following pattern is considered a problem:
@media tty {}
The following pattern is not considered a problem:
@media screen {}
Optional secondary options
ignoreMediaTypes
{ "ignoreMediaTypes": ["array", "of", "types", "/regex/"] }
Ignore the specified media types.
Given:
{
"media-type-no-deprecated": [true, { "ignoreMediaTypes": ["/^t/", "speech"] }]
}
The following patterns are not considered problems:
@media tv {}
@media tty {}
@media speech {}