[csswg-drafts] [css-grid-2][css-grid] `grid-template-rows/columns` Computed / Resolved Values for 'subgrid' values (#4362)

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

== [css-grid-2][css-grid] `grid-template-rows/columns` Computed / Resolved Values for 'subgrid' values ==
CSS Grid specifies `grid-template-rows/columns` [computed values](https://drafts.csswg.org/css-grid/#computed-tracks) and [resolved values](https://drafts.csswg.org/css-grid/#resolved-track-list). Note however that this is only for _Track Listing_ values and thus does not include the extension for `subgrid` values made in [CSS Grid 2](https://drafts.csswg.org/css-grid-2/#subgrid-per-axis).

I can't find anything in either spec that defines how this is supposed to work for `subgrid` values and I think this needs to be explicitly defined somewhere. I'd suggest that CSS Grid 2 add a section/paragraph to say how the computed/resolved `subgrid` values works. I tend to think that similar rules should apply in this case, namely that `repeat()` and empty _line-names_ are preserved in the computed value, and that the resolved value contains expanded _line-names_ for the explicit grid (which in a subgridded axis is its entire span) with any excess lines in the computed value dropped. IOW, the same rules as for _Track Listing_ but without the track sizes (and prefixed with `subgrid`).

I understand that the rules regarding _Track Listing_ were somewhat influenced by backward compatibility concerns with Microsoft's non-standard implementation. There are no such concerns for `subgrid` but it seems reasonable to use the same rules for the new values for consistency and to avoid confusion.

For example, assuming the subgrid's column axis spans 4 tracks, the _resolved value_ for `grid-template-columns: subgrid [a] repeat(auto-fill, [b]) [c]` is `subgrid [a] [b] [b] [b] [c]` and `grid-template-columns: subgrid [a] [a] [a] [a] repeat(auto-fill, [b]) [c] [c]` resolves to `subgrid [a] [a] [a] [a] [c]`.

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

Received on Tuesday, 24 September 2019 04:23:42 UTC