Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to ship: Some of the mediaqueries-4 syntax improvements.

57 views
Skip to first unread message

Emilio Cobos Álvarez

unread,
Jun 25, 2018, 3:14:23 PM6/25/18
to dev-pl...@lists.mozilla.org
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

L. David Baron

unread,
Jun 25, 2018, 5:01:58 PM6/25/18
to Emilio Cobos Álvarez, dev-pl...@lists.mozilla.org
How does the particular set of features that you're planning to ship
vs. not ship align with what other browsers have shipped (or are
close shipping)?

-David
--
𝄞 L. David Baron http://dbaron.org/ 𝄂
𝄢 Mozilla https://www.mozilla.org/ 𝄂
Before I built a wall I'd ask to know
What I was walling in or walling out,
And to whom I was like to give offense.
- Robert Frost, Mending Wall (1914)
signature.asc

Emilio Cobos Álvarez

unread,
Jun 25, 2018, 5:14:30 PM6/25/18
to dev-pl...@lists.mozilla.org
On 6/25/18 11:01 PM, L. David Baron wrote:
> How does the particular set of features that you're planning to ship
> vs. not ship align with what other browsers have shipped (or are
> close shipping)?

I'm not aware of any other browser implementing or shipping any of the
changes from MQ3 to MQ4, so we'd be the first to support these.

This subset is somewhat straight-forward, and spec author feedback is
clear I think:

https://lists.w3.org/Archives/Public/www-style/2017Feb/0036.html

I'd be fine not shipping it for now and keeping it behind a pref, but I
don't think it's worth it given how unlikely it is to change. Let me
know if you think otherwise though.

-- Emilio
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
0 new messages