Sha256: 4733b8574f8ba7f476cb52d824e06b2280b4961a97c21e4ae6e13db2815d8737
Contents?: true
Size: 1.62 KB
Versions: 23
Compression:
Stored size: 1.62 KB
Contents
# media-feature-name-value-whitelist Specify a whitelist of allowed media feature name and value pairs. <!-- prettier-ignore --> ```css @media screen and (min-width: 768px) {} /** ↑ ↑ * These features and values */ ``` ## Options ```js { "unprefixed-media-feature-name": ["array", "of", "values"], "/unprefixed-media-feature-name/": ["/regex/", "non-regex", /real-regex/] } ``` If a media feature name is found in the object, only its whitelisted values are allowed. If the media feature name is not included in the object, anything goes. If a name or value is surrounded with `/` (e.g. `"/width$/"`), it is interpreted as a regular expression. For example, `/width$/` will match `max-width` and `min-width`. Given: ``` { "min-width": ["768px", "1024px"], "/resolution/": ["/dpcm$/"] } ``` The following patterns are considered violations: <!-- prettier-ignore --> ```css @media screen and (min-width: 1000px) {} ``` <!-- prettier-ignore --> ```css @media screen and (min-resolution: 2dpi) {} ``` <!-- prettier-ignore --> ```css @media screen and (min-width > 1000px) {} ``` The following patterns are _not_ considered violations: <!-- prettier-ignore --> ```css @media screen and (min-width: 768px) {} ``` <!-- prettier-ignore --> ```css @media screen and (min-width: 1024px) {} ``` <!-- prettier-ignore --> ```css @media screen and (orientation: portrait) {} ``` <!-- prettier-ignore --> ```css @media screen and (min-resolution: 2dpcm) {} ``` <!-- prettier-ignore --> ```css @media screen and (resolution: 10dpcm) {} ``` <!-- prettier-ignore --> ```css @media screen and (768px < min-width) {} ```
Version data entries
23 entries across 23 versions & 1 rubygems