[csswg-drafts] [cssom] [mediaqueries] Media query serialization doesn't work for newer spec features (#5627)

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom] [mediaqueries] Media query serialization doesn't work for newer spec features ==
I recently became confused because WebKit / Blink sorted the media features in media query lists, but @lilles [did point out](https://bugs.chromium.org/p/chromium/issues/detail?id=1138859) to me that https://drafts.csswg.org/cssom/#serialize-a-media-query does say that:

> 5. Sort the media features in lexicographical order.

But this has gone very out of date with newer mediaqueries features (like nested expressions, etc), which for now only Gecko supports. This also gets more interesting when we support the multi-value expression syntax in https://github.com/w3c/csswg-drafts/issues/2791...

Gecko has never implemented the sorting step, so I'd propose to drop it: we don't know of any compat issue due to that, it was just that I was looking at interop around `MediaQueryList` as a result of a Gecko bug. Also, Gecko's behavior is more intuitive to me but maybe I'm biased :)

If we don't drop it, we need to define how the sorting works for stuff like nested expressions and such. Basically, we'd need to define sorting among two arbitrary `<media-condition>`s.

Thoughts?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5627 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 16 October 2020 13:06:26 UTC