[csswg-drafts] [css-grid-3][masonry] Make auto-fit do things (#10274)

fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-grid-3][masonry] Make auto-fit do things ==
As Tab pointed out in https://github.com/w3c/csswg-drafts/issues/9041#issuecomment-2075501616, `auto-fit` repeat value is currently defined to behave identically to `auto-fill` in masonry. See https://drafts.csswg.org/css-grid-3/#repeat-auto-fit

> repeat(auto-fit) behaves as repeat(auto-fill) when the other axis is a masonry axis. 

AFAICT the rationale was that we can't redistribute space to the other tracks since placement depends on sizing in masonry layouts.

However, that doesn't mean we can't use the alignment properties to redistribute space, so I think we should allow `auto-fit` to drop columns just as is does in regular Grid layout, and just forbid it from looping back into the track sizing algorithm.

This means that, for example, if you have a masonry grid with 3 items but you could fit 6 columns, we'd drop the extra 3 columns and allow you to use `justify-content: space-around` to distribute the columns.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10274 using your GitHub account


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

Received on Wednesday, 1 May 2024 13:54:55 UTC