[csswg-drafts] [css-grid-2] `subgrid` specified on grid-template-rows/columns and computed value for standalone axis (#9015)

KurtCattiSchmidt has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-grid-2] `subgrid` specified on grid-template-rows/columns and computed value for standalone axis  ==
"If there is no [parent grid](https://www.w3.org/TR/css-grid-2/#parent-grid), this value is equivalent to the initial value, [none](https://www.w3.org/TR/css-grid-2/#valdef-grid-template-rows-none), and the [grid container](https://www.w3.org/TR/css-grid-2/#grid-container) is not a [subgrid](https://www.w3.org/TR/css-grid-2/#subgrid)."

https://www.w3.org/TR/css-grid-2/#subgrid-listing

Does this also apply to the computed value for grid-template-rows/columns? That is my understanding, but no implementations are following this. I have a PR open to address this in Chromium ([here](https://chromium-review.googlesource.com/c/chromium/src/+/4647952)), but I wanted to run this by the working group to make sure I'm not missing anything.

To clarify, if an item has `display: grid`, and `grid-template-columns` is set to a value containing `subgrid`, but the item is *not* the child of a parent grid (and thus not a subgrid, but *is* a valid grid), should the computed value of `grid-template-columns` be `none`?

The variations of this are clear - if it's *not* `display: grid`, the computed value is the specified `subgrid` value as specified (not expanding repeaters, etc.), and if it *is* a valid subgrid, the computed value expands repeaters and outputs line names and not sizes. These are both in agreement across implementations.

Here's what I have observed for this scenario:

Blink: Crash (fixed in the above PR to compute to `none`)
Gecko: Reports tracks sizes *without* line names, as if it's a standalone grid (but missing line names). This seems incorrect to me.
WebKit: Returns the specified value as if it were not a grid container at all. This seems reasonable to me, but doesn't follow the above referenced line in the spec.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9015 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 28 June 2023 17:26:43 UTC