Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Should the syntax be changed (again) to match CSS Media Queries Level 4 #8
Comments
ausi
added
help wanted
question
labels
Jan 20, 2016
maxhoffmann
commented
Jan 20, 2016
I agree the CQ syntax should be as close as possible to the MQ syntax. Even identical if possible in my opinion. |
MarcusJT
commented
Feb 10, 2016
|
+1 for following the MQ syntax |
This was referenced Feb 13, 2016
tregusti
commented
Jul 2, 2016
|
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 :) |
ausi
added
enhancement
and removed
help wanted
question
labels
Jul 3, 2016
ausi
added this to To Do
in Version 0.4.0
Jun 10, 2017
added a commit
that referenced
this issue
Jun 10, 2017
ausi
moved this from To Do
to Done
in Version 0.4.0
Jun 10, 2017
|
Implemented in version 0.4.0. |
ausi
closed this
Jun 12, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ausi commentedJan 20, 2016
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: rightor even100px < width.Queries with two comparisons would change from
width > 100px < 200pxto the range syntax of the specification100px < width < 200pxor200px > 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 :)