mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 10:37:25 -04:00
42 lines
691 B
Markdown
42 lines
691 B
Markdown
|
# media-feature-name-whitelist
|
||
|
|
||
|
Specify a whitelist of allowed media feature names.
|
||
|
|
||
|
```css
|
||
|
@media (min-width: 700px) {}
|
||
|
/** ↑
|
||
|
* These media feature names */
|
||
|
```
|
||
|
|
||
|
**Caveat:** Media feature names within a range context are currently ignored.
|
||
|
|
||
|
## Options
|
||
|
|
||
|
`array|string|regex`: `["array", "of", "unprefixed", "media-features" or "regex"]|"media-feature"|/regex/`
|
||
|
|
||
|
Given:
|
||
|
|
||
|
```js
|
||
|
["max-width", "/^my-/"]
|
||
|
```
|
||
|
|
||
|
The following patterns are considered warnings:
|
||
|
|
||
|
```css
|
||
|
@media (min-width: 50em) {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
@media print and (min-resolution: 300dpi) {}
|
||
|
```
|
||
|
|
||
|
The following patterns are *not* considered warnings:
|
||
|
|
||
|
```css
|
||
|
@media (max-width: 50em) {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
@media (my-width: 50em) {}
|
||
|
```
|