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
The <ratio> value type is a positive (not zero or negative) <integer> followed by optional whitespace, followed by a solidus ('/'), followed by optional whitespace, followed by a positive <integer>. <ratio>s can be ordered or compared by transforming them into the number obtained by dividing their first <integer> by their second <integer>.
The <mq-boolean>value type is an <integer> with the value 0 or 1. Any other integer value is invalid. Note that -0 is always equivalent to 0 in CSS, and so is also accepted as a valid <mq-boolean>value.
Copy file name to clipboardExpand all lines: README.md
+43-6Lines changed: 43 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@
3
3
4
4
> Writing simple and graceful Media Queries!
5
5
6
-
The `min-width`,`max-width` and so on propertys of Media Queries is really easy to confuse, every time I see them, I want to cry. Right now in the new specs, you can use more intuitive <= or >= to instead of the min-/max- prefix of media queries.
6
+
The `min-width`,`max-width` and many other propertys of Media Queries are really confused, every time I see them, I want to cry. Right now in the new specs, you can use more intuitive <= or >= to instead of the min-/max- prefix of media queries.
7
7
8
-
This is a supporting CSS Media Queries Level 4 Polyfill plugin,which let you can ues these features right now. Mom won't never worry about my study, so amazing!
8
+
This is a supporting [CSS Media Queries Level 4](http://dev.w3.org/csswg/mediaqueries/) Polyfill plugin,which let you can ues these features right now. Mom won't never worry about my study, so amazing!
PostCSS Media Minmax is currently doesn't implement the `200px > = width` or `200px < = width` such a grammar, because the syntax readability this not too good.
The <ratio> value type is a positive (not zero or negative) <integer> followed by optional whitespace, followed by a solidus ('/'), followed by optional whitespace, followed by a positive <integer>. <ratio>s can be ordered or compared by transforming them into the number obtained by dividing their first <integer> by their second <integer>.
The <mq-boolean> value type is an <integer> with the value 0 or 1. Any other integer value is invalid. Note that -0 is always equivalent to 0 in CSS, and so is also accepted as a valid <mq-boolean> value.
104
+
105
+
```css
106
+
@mediascreenand (grid: -0) {
107
+
/* rules */
108
+
}
109
+
110
+
/* equivalent to */
111
+
@mediascreenand (grid: 0) {
112
+
/* rules */
113
+
}
114
+
```
78
115
79
116
## How to use
80
117
81
118
### Shorthand
82
119
83
-
In Example 1, the same feature name is `>=` and `<=`, which will be abbreviated as the following:
120
+
In Example 1, the same feature name is >= and <=, which will be abbreviated as the following:
84
121
85
122
```css
86
123
@mediascreenand (500px<=width<=1200px) {
@@ -106,7 +143,7 @@ Will get the same output results:
106
143
}
107
144
```
108
145
109
-
**Note**: when the feature name in the middle, we must ensure that two `<=` or `>=` in the same direction, otherwise which will not be converted.
146
+
**Note**: When the Media features name in the middle, we must ensure that two `<=` or `>=` in the same direction, otherwise which will not be converted.
110
147
111
148
E.g. in the example below, width is greater than or equal to 500px and is greater than or equal to 1200px, this is the wrong in grammar and logic.
112
149
@@ -119,7 +156,7 @@ E.g. in the example below, width is greater than or equal to 500px and is greate
119
156
}
120
157
```
121
158
122
-
### feature name
159
+
### Media features name
123
160
124
161
The following property supports the min-/max prefix in specification at present, which will be automatically converted by PostCSS Media Minmax.
125
162
@@ -142,7 +179,7 @@ The following property supports the min-/max prefix in specification at present,
0 commit comments