Re: [csswg-drafts] Alternative masonry path forward (#9041)

> @nmn 
>For example, one of the proposed features of `display: masonry` is to have auto-sized columns based on the content. This is currently not a feature of `display: grid`.

That particular proposal is possible with `display: masonry` and not with 'masonry in grid' precisely because of splitting the layout models. Grid layout was explained before as it not being possible -- or at least in any performant manner -- to combine auto-repeat with auto-size. The reason is actually simple: items have to align on the cross-axis. This means computing the ideal distribution of wrapping items into multiple rows/columns is really, really hard. Because what you gain on any axis, you might lose a lot on the other. And there are complex interdependencies of height vs width to consider as well. (Hello `aspect-ratio`)

With masonry you don't have that computational complexity problem, because it only is in alignment on **one* axis.


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


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

Received on Tuesday, 24 September 2024 15:51:56 UTC