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)

In this thread I just see references to collapsing gaps, but the current spec only has this concept for the gutters of a collapsed track.

It's not clear to me what this proposal would do if the track is defined to be e.g. `100px`. I don't think it makes much sense to collapse gaps if the track won't end up being zero. But it gets tricky because e.g. an `auto` track sizing function may end up producing a 0px track, or something bigger, and we don't know until the end of the track sizing algorithm, but the track sizing algo needs to know which gutters are collapsing.

I guess it could be restricted to collapsing the gutters adjacent to empty tracks whose min track sizing function is either a fixed `0px` or intrinsic, and whose max track sizing function is `0px` or intrinsic but not `auto`.

But I think it would be simpler to reuse the existing concept, and instead of adding a feature to only collapse gutters, add a feature to collapse empty tracks (and the adjacent gutters will collapse too).

Like `empty-tracks: collapse | auto`, where `collapse` (or maybe `hide` to align with `empty-cells`?) would collapse all empty tracks, and `auto` would only collapse the empty tracks generated by an `auto-fit` repetition.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 15 August 2023 19:31:25 UTC