- From: Kurt Catti-Schmidt via GitHub <sysbot+gh@w3.org>
- Date: Fri, 10 Mar 2023 18:51:00 +0000
- To: public-css-archive@w3.org
This isn't quite the case here - since there's no grid layout, there are no used values. This is specifically when `grid-template-columns` is specified on an item *without* `display: grid`. On an item with `dispay: grid`, it makes sense to expand and report used values, which is what we're doing. However, auto repeats cannot be expanded in this case. I was too broad in saying that it requires *layout*, it actually only requires a grid parent, as auto repeats in sugrid depend entirely in the remaining number of tracks that the subgrid spans in the grid parent (and not layout). If there's no grid parent or subgrid span, this cannot be computed. See https://www.w3.org/TR/css-grid-2/#auto-repeat - "On a [subgridded axis](https://www.w3.org/TR/css-grid-2/#subgridded-axis), the [auto-fill](https://www.w3.org/TR/css-grid-2/#valdef-repeat-auto-fill) keyword is only valid once per [<line-name-list>](https://www.w3.org/TR/css-grid-2/#typedef-line-name-list), and repeats enough times for the name list to match the [subgrid](https://www.w3.org/TR/css-grid-2/#subgrid)’s specified [grid span](https://www.w3.org/TR/css-grid-2/#grid-span) (falling back to 0 if the span is already fulfilled)." The test mentioned is actually specifically testing that auto repeats *don't* get expanded when there's no grid layout: [grid-template-computed-nogrid.html](https://wpt.fyi/results/css/css-grid/subgrid/grid-template-computed-nogrid.html?label=master&label=experimental&aligned&view=subtest&q=grid-template-computed-nogrid.html%20) But I saw a discrepancy in how browsers are handling integer repeats there - Safari doesn't expand integer repeats, while Firefox does. I slightly prefer Firefox's interpretation, as expanding integer repeats is closer to what items with valid grid layout end up doing, but it's inconsistent with auto repeats. Also, my change in Chromium is updating the aforementioned test (see https://chromium-review.googlesource.com/c/chromium/src/+/4317507) to validate that integer auto repeats *do* get expanded on non-grid's. This matches Firefox but fails in Safari. I'm happy to update Chromium's implementation and the test if this is incorrect. -- GitHub Notification of comment by KurtCattiSchmidt Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8555#issuecomment-1464244501 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 10 March 2023 18:51:01 UTC