Rule details
Disallow deprecated media types in @media rules.
What type of rule is this?
Warns about a potential problem
Example code
@media tv {
}
@media handheld and (max-width: 480px) {
}
@media screen, print, tty {
}
Prior Art
There are existing implementations.
- Stylelint's
media-type-no-deprecated reports deprecated media types.
- Biome's
noDeprecatedMediaType reports the same media types.
Participation
AI acknowledgment
Additional comments
The specification defines these eight media types as deprecated.
aural
braille
embossed
handheld
projection
speech
tty
tv
These media types are uncommon in modern CSS and are most likely to appear in legacy stylesheets.
However, the specification defines them to match nothing, and both Stylelint and Biome already check for them, so I would like to propose a rule that reports their use in this plugin as well.
Disclosure: I'm a participant of open source contribution program OSSCA
Rule details
Disallow deprecated media types in
@mediarules.What type of rule is this?
Warns about a potential problem
Example code
Prior Art
There are existing implementations.
media-type-no-deprecatedreports deprecated media types.noDeprecatedMediaTypereports the same media types.Participation
AI acknowledgment
Additional comments
The specification defines these eight media types as deprecated.
auralbrailleembossedhandheldprojectionspeechttytvThese media types are uncommon in modern CSS and are most likely to appear in legacy stylesheets.
However, the specification defines them to match nothing, and both Stylelint and Biome already check for them, so I would like to propose a rule that reports their use in this plugin as well.
Disclosure: I'm a participant of open source contribution program OSSCA