Skip to content

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

@KurtCattiSchmidt

Description

@KurtCattiSchmidt

"If there is no parent grid, this value is equivalent to the initial value, none, and the grid container is not a 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), 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). I can see how this behaves as if it's none by ignoring the line names, but it seems a bit strange.
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    css-grid-2Subgrid; Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions