Re: [csswg-drafts] [css-grid-3] Designer/developer feedback on masonry layout (#10233)

Wouldn't this new spec be very similar to [grid-auto-flow: dense](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow#:~:text=columns%20as%20necessary.-,dense,this%20leaves%20holes%20that%20could%20have%20been%20filled%20by%20later%20items.,-Formal%20definition)? Can we amend it to handle content of varying size, to me that appears to be the only difference? I'm sure there are many low level engineering reasons why grid-auto-flow: dense is different or can't be amended and I would like know what they are. Rachel Andrews briefly [mentions](https://developer.chrome.com/blog/masonry#:~:text=grid%2Dauto%2Dflow%20doesn%27t%20apply%20to%20masonry%20and%20masonry%2Dauto%2Dflow%20doesn%27t%20apply%20to%20grid.%20Merging%20them%20would%20create%20problems%20of%20things%20that%20are%20invalid%20due%20to%20the%20layout%20method%20you%20are%20in.) this but does not go into detail.

If "masonry" is added I think it should be a new layout type not part of grid. Adding it to grid will be redundant and it will be confused with grid-auto-flow: dense. Either way there will be many posts in the future asking: "What's the difference between grid-auto-flow: dense and 'masonry'?" and "Why does grid-auto-flow: dense exist and why use it?"

Some name ideas: stagger, condense, offset, compact, matrix, stack. 

I would like to see vertical/column, horizontal/row and auto (auto arrange even if out of order) options. e.g.  stagger: auto, stagger: row or stagger: column

Has the csswg even agreed on what a "masonry" layout is? There are many variations. 

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


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

Received on Tuesday, 7 May 2024 08:50:53 UTC