W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2018

Re: [csswg-drafts] [css-grid-2] subgrid and grid-gap

From: Manuel Rego Casasnovas via GitHub <sysbot+gh@w3.org>
Date: Thu, 08 Feb 2018 08:27:14 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-364037263-1518078433-sysbot+gh@w3.org>
I believe a simpler approach for the example would be to add a margin to the subgrid element, instead of using gutters on the parent grid.

If we use gutters in the parent grid I don't see how we can change its size in the subgrid, the idea of subgrids is to share the track sizes with the parent, we'll be losing that as @fantasai explains, so I'm not convinced this is a good idea.

An example of a grid with 2 columns: `grid-template-columns: 200px 100px`. That in the 2nd row as a subgrid.
On the first image it keeps the gap from the parent, so the size of the tracks are still `200px 100px`.
On the 2nd one it removes the gaps, so the size of the tracks in the subgrid would be `225px 125px`. Which would be quite strange.

![Example of subgrids with different gaps](https://user-images.githubusercontent.com/11602/35962540-1a5c2e30-0cb2-11e8-816c-778a21662f77.png)

GitHub Notification of comment by mrego
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2285#issuecomment-364037263 using your GitHub account
Received on Thursday, 8 February 2018 08:27:25 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:24 UTC