-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should the syntax be changed (again) to match CSS Media Queries Level 4 #8
Comments
I agree the CQ syntax should be as close as possible to the MQ syntax. Even identical if possible in my opinion. |
+1 for following the MQ syntax |
So, not many responses here, but so far the consensus is to change the syntax. Any thoughts on going forward? |
I think you are right, we should change the syntax as suggested.
As soon as I’ve got time, I will work on it :) |
Implemented in version 0.4.0. |
The Media Queries Level 4 draft allows a slightly different syntax for media features than cq-prolyfill. Using the same syntax as media queries would be more consistent and thus easier to reason about for CSS authors.
The current syntax would still be valid for simple queries e.g.
width > 100px
, but more variants would be possible likemin-width: 100px
,text-align: right
or even100px < width
.Queries with two comparisons would change from
width > 100px < 200px
to the range syntax of the specification100px < width < 200px
or200px > width > 100px
.The color filters would be changed to a suffix so
color lightness <= 20%
getscolor-lightness <= 20%
ormax-color-lightness: 20%
.The biggest difference is that media queries don’t allow the not-equal (
!=
) comparision, so:container(text-align != right)
would become:not(:container(text-align = right))
or:not(:container(text-align: right))
.Are the benefits of this enough to justify another change to the syntax of cq-prolyfill? (+1 or -1 comments are welcome too :)
The text was updated successfully, but these errors were encountered: