UNPKG

1.01 kBMarkdownView Raw
1# media-feature-name-whitelist
2
3Specify a whitelist of allowed media feature names.
4
5<!-- prettier-ignore -->
6```css
7@media (min-width: 700px) {}
8/** ↑
9 * This media feature name */
10```
11
12## Options
13
14`array|string|regex`: `["array", "of", "unprefixed", /media-features/ or "regex"]|"media-feature"|/regex/`
15
16Given:
17
18```
19["max-width", "/^my-/"]
20```
21
22The following patterns are considered violations:
23
24<!-- prettier-ignore -->
25```css
26@media (min-width: 50em) {}
27```
28
29<!-- prettier-ignore -->
30```css
31@media print and (min-resolution: 300dpi) {}
32```
33
34<!-- prettier-ignore -->
35```css
36@media (min-width < 50em) {}
37```
38
39<!-- prettier-ignore -->
40```css
41@media (10em < min-width < 50em) {}
42```
43
44The following patterns are _not_ considered violations:
45
46<!-- prettier-ignore -->
47```css
48@media (max-width: 50em) {}
49```
50
51<!-- prettier-ignore -->
52```css
53@media (my-width: 50em) {}
54```
55
56<!-- prettier-ignore -->
57```css
58@media (max-width > 50em) {}
59```
60
61<!-- prettier-ignore -->
62```css
63@media (10em < my-width < 50em) {}
64```