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)

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