- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Wed, 28 Sep 2022 15:02:06 +0000
- To: public-css-archive@w3.org
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-grid] Should `grid` shorthand prefer serializing as`<'grid-template'>` or with `auto-flow`? == Consider ```js element.style.cssText = ` grid-template-rows: none; grid-template-columns: 100px; grid-template-areas: none; grid-auto-rows: auto; grid-auto-columns: auto; grid-auto-flow: row; `; element.style.cssText; // ??? ``` The `grid` shorthand can represent these longhands in two different ways: - ```css grid: none / 100px; /* <'grid-template'> */ ``` This sets `grid-template-rows: none`, `grid-template-columns: 100px`, and resets the other longhands to initial values. - ```css grid: auto-flow / 100px; ``` This sets `grid-auto-flow: row`, `grid-auto-columns` to the omitted `auto`, `grid-template-columns: 100px`, and resets the other longhands to initial values Which one should be preferred? Firefox and WebKit (once https://github.com/WebKit/WebKit/pull/4648 lands) prefer serializing as `<'grid-template'>`. Blink says `auto-flow auto / 100px`, but the serialization of `grid` is very broken in Blink, the logic also seems to prefer `<'grid-template'>` but it mistakenly fails to do so due to some bugs. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7805 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 28 September 2022 15:02:07 UTC