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)

Consider a grid with two `minmax(auto, max-content)` columns, one small item in the 1st column, and a 2nd big item spanning both columns.

Currently, the algorithm will size the 1st column tightly around the 1st item, and the remaining size of the 2nd item will be accommodated by the 2nd column.

With fantasai's proposal of spanning items and `empty-tracks: auto` by default, then we would collapse the 2nd track, so the 1st column will grow to accommodate both items. I don't think this would be web compatible.

Even if `empty-tracks: auto` isn't the default, I'm not convinced that collapsing the 2nd track is desirable.

> Maybe this check could actually be part of the grid sizing algorithm, right after step 2.

Steps 3 and 4 are only needed when there are things like aspect ratios or orthogonal flows, with this they would need to run more frequently.

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


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

Received on Wednesday, 28 August 2024 16:52:31 UTC