Hi,

In bug 1422225 I plan to land most of the syntax improvements to mediaqueries-4.

Some of the features included are:

* Allowing operators such as >, <, >=, or <= in media feature expressions, which allows to properly exclude media queries in a way min-* and max-* cannot, like:

     @media (width >= 900px) { some rules }
     @media (width < 900px) { some other rules }

Guarantees that either `some rules` or `some other rules` apply, which is something that is not guaranteed by the existing syntax (see [1] or [2], for example).

 * Or expressions, and arbitrary expression nesting like:

@media ((width >= 500px) and (width <= 900px)) or (not (orientation: portrait))

Things that are _not_ included are:

 * The range syntax, or allowing values before the feature name, that is:

    @media (500px > width) or (500px < width < 900px)

This is nice, but not so trivial to implement, and you can either reverse the expression (`(width <= 500px)` in the first case), or use the expanded version of it using `and` expressions for the second.

* The changes to serialization and parsing that allows basically anything in a feature expression to be valid, that is, treating as a valid media query something like:

    @media (orientation: portrait) or (garbage)

Bug 1469174 and bug 1469173 are tracking those two, respectively.

Let me know if you find unknown issues, or think we shouldn't ship this.

Thanks!

 -- Emilio

[1]: http://damienclarke.me/code/posts/those-1px-gaps-between-media-queries-can-be-a-problem
[2]: https://github.com/twbs/bootstrap/issues/19197

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to