Re: [csswg-drafts] [css-grid-3][Masonry] repeat(auto-fill, auto) with no masonry items (#12771)

As a note, you can still end up with a bunch of 0px sized tracks in this case (even though we avoid the division by  0).

What happens is that we compute the number of tracks based on 1px. Lets say your available space is 100px. Then you'd get 100 auto sized tracks.

There are no items, so these resolve to 0px. We then go to stretch auto tracks, which will result in 100 1px tracks, but only if the alignment property in that direction is stretch. Otherwise, you get 100 0px tracks instead, which is kind of weird. But I suppose not a huge deal since there aren't any items anyways

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


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

Received on Friday, 12 September 2025 23:05:08 UTC