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

> I do wonder if there's any best-of-both approach here? But I don't know what that would look like. Just thinking: `gap` works in both `flexbox` and `grid` display values. Are there more properties that could be shared across `grid` and `masonry` displays? Or, as per @phaux, useful ways for the two layouts to relate to each other?
> 
> I get the complexity of properties working slightly different in different contexts, but it also feels real awkward having nearly-identical properties with nearly-identical syntax, but no interop. I'm not convinced that's actually "more clear" for authors in any meaningful way.

@mirisuzanne Rachel Andrew has done an excellent job (as they always do) writing down the reasoning and shareable properties: https://developer.chrome.com/blog/masonry

Plus, this write-up by Tab Atkins (one of the original spec writers for css grid) explains why "nearly-identical" is the best possible situation right now, whether masonry becomes an extension to css grid or its own layout: https://github.com/w3c/csswg-drafts/issues/9041#issuecomment-2075501616

Some more thoughts:

- Is it me or does submasonry not really make sense for 99% of use cases. When the parent item spans 1 column there is no submasonry. When it spans more (not a common use case?) submasonry allows the sub items to take their own columns. Especially since there are no rows it feels like that could be solved with a flexbox with the same gap. The only reason submasonry would work differently is if every column was a separate width and gaps were not uniform, right?
- Would the masonry ("columns") layout also allow for a more layout-ready/print-ready `columns`? Because `columns` is very cool for newspaper-like layout but has some interesting quirks with cutting items off in various scenarios. So if masonry would support top-to-bottom first, left-to-right second layout this would allow for css paged media to become easier and more consistent.

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


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

Received on Tuesday, 14 May 2024 08:29:19 UTC