- From: Daniel Holbert via GitHub <sysbot+gh@w3.org>
- Date: Wed, 15 Mar 2023 23:15:12 +0000
- To: public-css-archive@w3.org
dholbert has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-contain-3] Contain specs disagree about canonical order of `contain` keywords == css-contain-1 defined the grammar for `contain` like so, with `size` at the start when using the longhand syntax: ``` Value: none | strict | content | [ size || layout || paint ] ``` ...whereas css-contain-3 flips the order to put `size` at the end: ``` New values: layout || style || paint || [ size | inline-size ] ``` The order matters for serialization, per https://drafts.csswg.org/cssom/#serialize-a-css-value , which says: > If certain component values can appear in any order without changing the meaning of the value (a pattern typically represented by a double bar [||](https://w3c.github.io/csswg-drafts/css-values-4/#comb-any) in the value syntax), **reorder the component values to use the canonical order of component values as given in the property definition table.** If you're looking at css-contain-1, you would expect `size` (and hence `inline-size`) to serialize at the start of the list. If you're looking at css-contain-3, you'd expect them to serialize them at the end of the list. Looking at what immplementations do & WPT tests expect: - implementations do serialize `size` at the start, and Chromium/WebKit serialize `inline-size` at the start too (whereas Firefox serializes it at the end, but probably should put it at the start, for consistency with the fact that we serialize `size` at the start). - Two WPT tests expect `size` and `inline-size` to serialize at the start: https://wpt.fyi/results/css/css-contain/parsing/contain-valid.html and https://wpt.fyi/results/css/css-contain/parsing/contain-computed.html So probably the ordering in css-contain-3 should be fixed to put `[size | inline-size]` at the start. (Perhaps we should also add `none | strict | content` keywords to it as well, while we're at it? I'm not sure whether it's problematic for those to be omitted from "New values" or not, given that we're repeating most of the preexisting grammar there except for those ones.) Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8600 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 15 March 2023 23:15:14 UTC