Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 1.28 KB

media-feature-name-no-unknown.md

File metadata and controls

73 lines (48 loc) · 1.28 KB

Pattern: Unknown media feature name

Issue: -

Description

This rule considers media feature names defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

All vendor-prefixed media feature names are ignored.

Caveat: Media feature names within a range context are currently ignored.

Examples

The following patterns are considered violations:

@media screen and (unknown) {}
@media screen and (unknown: 10px) {}

The following patterns are not considered violations:

@media all and (monochrome) {}
@media (min-width: 700px) {}
@media (MIN-WIDTH: 700px) {}
@media (min-width: 700px) and (orientation: landscape) {}
@media (-webkit-min-device-pixel-ratio: 2) {}

Configuration

ignoreMediaFeatureNames: ["/regex/", "string"]

Given:

["/^some-/", "custom"]

The following patterns are not considered violations:

@media screen and (some-media-feature-name) {}
@media screen and (custom: 10px) {}
@media (min-width: 700px) and (custom: 10px) {}

Further Reading