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

Re: [csswg-drafts] [css-grid-2] subgrid border/padding/margin

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Tue, 12 Jun 2018 01:08:58 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-396433677-1528765737-sysbot+gh@w3.org>
Wrt ISSUE 1: Currently the spec says

> The subgrid itself lays out as an ordinary grid item in its parent grid, but acts as if it was completely empty for sizing purposes in the subgridded dimension. 

So the MBP _is_ accounted for, the accounting is just not constrained to any particular track. I agree, however, that this doesn't quite give the expected results if, e.g. the first track is empty but the second one contains an item. We have I think two options here:

- Minimally account for the MBP by making sure that the combination of tracks from the last track with an item in it to the edge of the subgrid has enough space to accommodate the subgrid’s MBP.
- Strictly account for the MBP in the track at the subgrid’s edge.

The difference between the two accounting methods is most easily seen in an empty subgrid, e.g.  one spanning `auto 20px auto` tracks. Suppose the subgrid has 5px borders and 5px padding. In the first solution, the auto tracks will be zero width, since there's enough room for the borders and padding in the middle track. In the second solution, the auto tracks will be 10px each, because the borders and padding are forced to be accounted for in the outermost spanned tracks.

I'm not sure which solution is ideal from an authoring perspective. @rachelandrew @jensimmons  @frivoal @bradkemper ?

GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2592#issuecomment-396433677 using your GitHub account
Received on Tuesday, 12 June 2018 01:09:01 UTC

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