Re: [csswg-drafts] [css-grid-3][Masonry] Repeat(auto-fill, auto) and % sized items (#12432)

> When the second row contains span 6, why do repeat(auto-fill, 60px) and repeat(auto-fill, auto) result in different renderings for the first row?

This is because 5 columns of 60px fills up 300px exactly. For the auto case, we end up sizing the columns based on the item min content size, which doesn't happen to be exactly 60px. And because we end up adding a 6th column, that 6th column prevents the auto tracks from expanding to be flush with the container size. When there is a span of 5, we don't have a 6th implicit column, which allows auto tracks to stretch (per the last step of track sizing: https://www.w3.org/TR/css-grid-2/#algo-stretch).

With `repeat(auto-fill, auto)`, you should get the same rendering as what you'd get if you specified `repeat(5, auto)` in your example.

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


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

Received on Monday, 27 October 2025 16:56:44 UTC