Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 642 Bytes

File metadata and controls

41 lines (28 loc) · 642 Bytes

media-feature-name-whitelist

Specify a whitelist of allowed media feature names.

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

This rule ignores media feature names within a range context.

选项

array|string|regex: ["array", "of", "unprefixed", /media-features/ or "regex"]|"media-feature"|/regex/

给定:

["max-width", "/^my-/"]

以下模式被视为违规:

@media (min-width: 50em) {}
@media print and (min-resolution: 300dpi) {}

以下模式被视为违规:

@media (max-width: 50em) {}
@media (my-width: 50em) {}