1
0
mirror of https://github.com/thangisme/notes.git synced 2024-09-26 14:06:00 -04:00
notes/node_modules/stylelint/lib/rules/media-feature-name-no-unknown
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00
..
index.js Initial commit 2017-03-09 13:16:08 -05:00
README.md Initial commit 2017-03-09 13:16:08 -05:00

media-feature-name-no-unknown

Disallow unknown media feature names.

@media (min-width: 700px) {}
/**     ↑
 * These media feature names */

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.

Options

true

The following patterns are considered warnings:

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

The following patterns are not considered warnings:

@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) {}

Optional secondary options

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

Given:

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

The following patterns are not considered warnings:

@media screen and (my-media-feature-name) {}
@media screen and (MY-MEDIA-FEATURE-NAME) {}
@media screen and (custom: 10px) {}
@media (min-width: 700px) and (custom: 10px) {}