Skip to content

New Rule: no-deprecated-media-types #555

Description

@electrohyun

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.

  1. Stylelint's media-type-no-deprecated reports deprecated media types.
  2. Biome's noDeprecatedMediaType reports the same media types.

Participation

  • I am willing to submit a pull request to implement this rule.

AI acknowledgment

  • I did not use AI to generate this issue report.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

  • Status
    Feedback Needed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions