[csswg-drafts] [mediaqueries-4] Need to describe how to serialize <general-enclosed> in mediaqueries. (#7266)

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

== [mediaqueries-4] Need to describe how to serialize <general-enclosed> in mediaqueries. ==
[The syntax](https://drafts.csswg.org/mediaqueries-4/#mq-syntax) in mediaqueries-4 allows `<general-enclosed>` productions within mediaqueries.

The [general serialization rules for mediaqueries](https://drafts.csswg.org/cssom-1/#serializing-media-queries) are in cssom-1, but they cover mediaqueries-3.

I don't see anything in either that says how to serialize a mediaquery that contains a part parsed as `<general-enclosed>`.  It looks like the Chromium implementation just serializes "as written" (probably with some tokenization normalization?), but it seems like this should be specified somewhere.

(This does have some interesting side effects; for example `((width)and (height))` is normalized in serialization to add the space before `and`, but `((width)and (height) or (color))` is not, because it's `<general-enclosed>`.)

It also seems like perhaps mediaqueries-4 should move the serialization rules out of cssom-1 and make the appropriate edits to them.

cc @andruud 

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


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

Received on Tuesday, 10 May 2022 19:59:00 UTC