-
Notifications
You must be signed in to change notification settings - Fork 716
[mediaqueries-4] Need to describe how to serialize <general-enclosed> in mediaqueries. #7266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What are the options?
|
I repeat my point in #8735 (now closed) on serializing exactly as specified by the author.
One solution I see would be to consume a run of comments or whitespaces before and after consuming a token, except after opening/ending tokens. But this is not my preferred solution to serialize Now there seems to be some beginning of cross-browser compat, to serialize exactly as specified, so I do not know. |
This is the last of the at-rule prelude parsing, and also extends into container query parsing and most of sizes attribute parsing (there's a tiny fraction left). We change serialization in one WPT test; it's not really defined how <general-enclosed> should serialize[1], and now we keep trailing whitespace inside, instead of reducing it to one space. [1] w3c/csswg-drafts#7266 Change-Id: I0e8ad6bf72ad8524b825a1bee477429c6104103d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5822456 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Commit-Queue: Steinar H Gunderson <sesse@chromium.org> Cr-Commit-Position: refs/heads/main@{#1350690}
There is an open issue saying this needs to be specified[1]. Change the expectation to align with Gecko and Chromium for now, which both keep the original serialization for general-enclosed. [1] w3c/csswg-drafts#7266 Change-Id: I1986ae7a7f63c2c63ef841f047034eeccdc3828d
There is an open issue saying this needs to be specified[1]. Change the expectation to align with Gecko and Chromium for now, which both keep the original serialization for general-enclosed. [1] w3c/csswg-drafts#7266 Change-Id: I1986ae7a7f63c2c63ef841f047034eeccdc3828d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925360 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Steinar H Gunderson <sesse@chromium.org> Cr-Commit-Position: refs/heads/main@{#1368182}
There is an open issue saying this needs to be specified[1]. Change the expectation to align with Gecko and Chromium for now, which both keep the original serialization for general-enclosed. [1] w3c/csswg-drafts#7266 Change-Id: I1986ae7a7f63c2c63ef841f047034eeccdc3828d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925360 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Steinar H Gunderson <sesse@chromium.org> Cr-Commit-Position: refs/heads/main@{#1368182}
There is an open issue saying this needs to be specified[1]. Change the expectation to align with Gecko and Chromium for now, which both keep the original serialization for general-enclosed. [1] w3c/csswg-drafts#7266 Change-Id: I1986ae7a7f63c2c63ef841f047034eeccdc3828d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925360 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Steinar H Gunderson <sesse@chromium.org> Cr-Commit-Position: refs/heads/main@{#1368182}
…eral-enclosed in test, a=testonly Automatic update from web-platform-tests [@container] Change serialization of general-enclosed in test There is an open issue saying this needs to be specified[1]. Change the expectation to align with Gecko and Chromium for now, which both keep the original serialization for general-enclosed. [1] w3c/csswg-drafts#7266 Change-Id: I1986ae7a7f63c2c63ef841f047034eeccdc3828d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925360 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Steinar H Gunderson <sesse@chromium.org> Cr-Commit-Position: refs/heads/main@{#1368182} -- wpt-commits: 598e86ac6913319529be27d0f1e53d79773c72cc wpt-pr: 48596
…eral-enclosed in test, a=testonly Automatic update from web-platform-tests [@container] Change serialization of general-enclosed in test There is an open issue saying this needs to be specified[1]. Change the expectation to align with Gecko and Chromium for now, which both keep the original serialization for general-enclosed. [1] w3c/csswg-drafts#7266 Change-Id: I1986ae7a7f63c2c63ef841f047034eeccdc3828d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925360 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Steinar H Gunderson <sesse@chromium.org> Cr-Commit-Position: refs/heads/main@{#1368182} -- wpt-commits: 598e86ac6913319529be27d0f1e53d79773c72cc wpt-pr: 48596
…ral-enclosed in test, a=testonly Automatic update from web-platform-tests [container] Change serialization of general-enclosed in test There is an open issue saying this needs to be specified[1]. Change the expectation to align with Gecko and Chromium for now, which both keep the original serialization for general-enclosed. [1] w3c/csswg-drafts#7266 Change-Id: I1986ae7a7f63c2c63ef841f047034eeccdc3828d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925360 Commit-Queue: Rune Lillesveen <futharkchromium.org> Reviewed-by: Steinar H Gunderson <sessechromium.org> Cr-Commit-Position: refs/heads/main{#1368182} -- wpt-commits: 598e86ac6913319529be27d0f1e53d79773c72cc wpt-pr: 48596 UltraBlame original commit: e2128da95f49fe932ba02f60b6d53eda84e20dd8
…ral-enclosed in test, a=testonly Automatic update from web-platform-tests [container] Change serialization of general-enclosed in test There is an open issue saying this needs to be specified[1]. Change the expectation to align with Gecko and Chromium for now, which both keep the original serialization for general-enclosed. [1] w3c/csswg-drafts#7266 Change-Id: I1986ae7a7f63c2c63ef841f047034eeccdc3828d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925360 Commit-Queue: Rune Lillesveen <futharkchromium.org> Reviewed-by: Steinar H Gunderson <sessechromium.org> Cr-Commit-Position: refs/heads/main{#1368182} -- wpt-commits: 598e86ac6913319529be27d0f1e53d79773c72cc wpt-pr: 48596 UltraBlame original commit: e2128da95f49fe932ba02f60b6d53eda84e20dd8
…ral-enclosed in test, a=testonly Automatic update from web-platform-tests [container] Change serialization of general-enclosed in test There is an open issue saying this needs to be specified[1]. Change the expectation to align with Gecko and Chromium for now, which both keep the original serialization for general-enclosed. [1] w3c/csswg-drafts#7266 Change-Id: I1986ae7a7f63c2c63ef841f047034eeccdc3828d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925360 Commit-Queue: Rune Lillesveen <futharkchromium.org> Reviewed-by: Steinar H Gunderson <sessechromium.org> Cr-Commit-Position: refs/heads/main{#1368182} -- wpt-commits: 598e86ac6913319529be27d0f1e53d79773c72cc wpt-pr: 48596 UltraBlame original commit: e2128da95f49fe932ba02f60b6d53eda84e20dd8
The syntax in mediaqueries-4 allows
<general-enclosed>
productions within mediaqueries.The general serialization rules for mediaqueries 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 beforeand
, 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
The text was updated successfully, but these errors were encountered: