You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Existing CSS Parsers don't do a great job at parsing the details of media queries. That's where `css-mediaquery` shines. You can parse a media query expression and get an AST back by using the `parse()` method.
44
+
Existing CSS Parsers don't do a great job at parsing the details of media
45
+
queries. That's where `css-mediaquery` shines. You can parse a media query
46
+
expression and get an AST back by using the `parse()` method.
44
47
45
48
```javascript
46
49
@@ -52,21 +55,9 @@ var ast = mediaQuery.parse('screen and (min-width: 48em)');
52
55
The `ast` variable will have the following payload:
53
56
54
57
```javascript
55
-
56
-
[
57
-
{
58
-
"inverse":false,
59
-
"type":"screen",
60
-
"expressions": [
61
-
{
62
-
"modifier":"min",
63
-
"feature":"width",
64
-
"value":"48em"
65
-
}
66
-
]
67
-
}
68
-
]
69
-
58
+
[ { inverse:false, type:'screen', expressions: [
59
+
{ modifier:'min', feature:'width', value:'48em' }
60
+
] } ]
70
61
```
71
62
72
63
This package was written with care to following the W3C Recommendations for
@@ -76,7 +67,8 @@ a common unit before comparing them.
76
67
77
68
78
69
The values specified to check a media query string against should be thought of
79
-
as if they are the current state of a device/browser. A `type` value _must_ be specified, and it can _not_ be `"all"`.
70
+
as if they are the current state of a device/browser. A `type` value _must_ be
0 commit comments