.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / media-feature-name-no-unknown / README.md
1 # media-feature-name-no-unknown
2
3 Disallow unknown media feature names.
4
5 ```css
6 @media (min-width: 700px) {}
7 /**     ↑
8  * These media feature names */
9 ```
10
11 This rule considers media feature names defined in the CSS Specifications, up to and including Editor's Drafts, to be known.
12
13 All vendor-prefixed media feature names are ignored.
14
15 Caveat: Media feature names within a [range context](https://www.w3.org/TR/mediaqueries-4/#mq-ranges) are currently ignored.
16
17 ## Options
18
19 ### `true`
20
21 The following patterns are considered violations:
22
23 ```css
24 @media screen and (unknown) {}
25 ```
26
27 ```css
28 @media screen and (unknown: 10px) {}
29 ```
30
31 The following patterns are *not* considered violations:
32
33 ```css
34 @media all and (monochrome) {}
35 ```
36
37 ```css
38 @media (min-width: 700px) {}
39 ```
40
41 ```css
42 @media (MIN-WIDTH: 700px) {}
43 ```
44
45 ```css
46 @media (min-width: 700px) and (orientation: landscape) {}
47 ```
48
49 ```css
50 @media (-webkit-min-device-pixel-ratio: 2) {}
51 ```
52
53 ## Optional secondary options
54
55 ### `ignoreMediaFeatureNames: ["/regex/", "string"]`
56
57 Given:
58
59 ```js
60 ["/^my-/", "custom"]
61 ```
62
63 The following patterns are *not* considered violations:
64
65 ```css
66 @media screen and (my-media-feature-name) {}
67 ```
68
69 ```css
70 @media screen and (custom: 10px) {}
71 ```
72
73 ```css
74 @media (min-width: 700px) and (custom: 10px) {}
75 ```