Re: [csswg-drafts] [css-grid-2] Masonry layout (#4650)

While I like many aspects of the proposal, I tend to prefer a `display: masonry` layout mode that re-uses many of the grid/alignment properties instead of `display: grid` with `masonry` as a column/row template.

The reason: there are *lots* of weird edge cases and interactions in grid layout. Sizing rules have been exhaustively defined, but will still need to be refined every time new features are added (e.g., subgrid). Adding an extra mode where sometimes the grid doesn't actually exist in one direction would likely change the best approach for some of these situations. Versus, with a separate display mode we can consider the rules & constraints that make the most sense, independent of the grid behavior.

Example: with masonry, which items get placed in which columns depends on the heights of previous items (for vertical masonry). And the height of text-container items often depends on the width. But the width of a grid column can depend on the contents of that column & now we have a new circular layout concern (maximizing a column width to fit around an item can make it so that item is no longer in that column) that didn't exist in regular grid layout.

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

Received on Wednesday, 22 January 2020 18:31:24 UTC