- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Mon, 09 Sep 2024 18:07:51 +0000
- To: public-css-archive@w3.org
Elika pointed out privately a feature of Grid 1 that I'd completely forgotten about (described in the section they link) - the explicit grid is sized by *the larger of* `grid-template-areas` and `grid-template-rows/columns`. If `grid-template-areas` gives a longer list in an axis than you've provided via `grid-template-rows/columns`, then the remaining tracks are sized by `grid-auto-rows/columns`, but are still considered part of the explicit grid. So, `auto-areas` isn't actually needed for the purpose of filling in tracks to match the areas list; the existing initial values of the relevant properties work just fine. However, `auto-areas` does one additional important thing, which is fall back to `auto-fill` if there are no named areas; this is *not* done by the default Grid values. This means that, by default, a masonry will fill with as many `auto` columns as it can fit (and it can tell how large `auto` is since its placement and sizing are intertwined). This isn't done in Grid - by default, a Grid will end up with an empty explicit grid, and an implicit grid sized to either the largest span or the largest definition position. I think this remains an ideal default behavior for Masonry containers. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10854#issuecomment-2338771984 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 9 September 2024 18:07:51 UTC