- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Thu, 02 Apr 2020 19:41:40 +0000
- To: public-css-archive@w3.org
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-grid] Does grid-template-areas really expand the explicit grid? == From https://drafts.csswg.org/css-grid/#implicit-grids > The `grid-template-rows`, `grid-template-columns`, and `grid-template-areas` properties define a fixed number of tracks that form the explicit grid. I'm not convinced about the latter. For example, consider ```css #grid { display: grid; grid-template-areas: '. .'; grid-template-columns: 10px; grid-auto-columns: 20px; } ``` If the explicit grid has 2 columns due to `grid-template-areas`, which is the track sizing function of the 2nd one? The spec says that `grid-auto-columns` is only for implicit tracks! > The grid-auto-rows and grid-auto-columns properties size these implicit grid tracks. Then https://drafts.csswg.org/css-grid/#propdef-grid-auto-columns seems to redefine implicit tracks in a way that ignores `grid-template-areas`: > If a grid item is positioned into a row or column that is not explicitly sized by grid-template-rows or grid-template-columns, implicit grid tracks are created to hold it. I have tested it a bit and it seems that Chromium and Firefox are consistent in this regard: - Evidence that extra tracks from `grid-template-areas` are explicit: - They are created even if there is no item in them. - Extra lines are not considered to have all names in https://drafts.csswg.org/css-grid/#grid-placement-int. - Evidence that extra tracks from `grid-template-areas` are implicit: - They are sized using `grid-auto-columns/rows`. - They are not included in the resolved value of `grid-template-rows`/`grid-template-columns`. So maybe we need a middle concept between explicit and implicit, and define things correctly. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4914 using your GitHub account
Received on Thursday, 2 April 2020 19:41:43 UTC