W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2020

Re: [csswg-drafts] [css-grid] grid-gap is still taking up space when an element defined in grid-template-area is not on the page. (#5813)

From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
Date: Sun, 27 Dec 2020 10:02:13 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-751447788-1609063332-sysbot+gh@w3.org>
What you can do right now is define your grid differently when one of the elements is not in the DOM or not displayed.

In your example this means to only specify the `"picture"` and `"content"` areas and only two `grid-template-rows`.

Another solution for this would be allowing to define different gap sizes as discussed in #1659.

Besides those two approaches, I think a general solution for this would be to have a way to control whether to collapse gaps adjacent to empty grid tracks - something like a `gap-collapse` property with the values `none` and `adjacent`.

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5813#issuecomment-751447788 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 27 December 2020 10:02:15 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:37 UTC