Re: [csswg-drafts] [css-grid-3][masonry] Masonry Syntax Debate (#11243)

Thinking about the TAG's question of what we would have done if we had a time machine... I might have proposed a refactoring of Grid+Flexbox into:
1. A scheme for specifying layout boundaries in a 2D space, in both horizontal and vertical directions. I'm reminded of "guidelines" from the desktop publishing world. In CSS, we have something similar in track definitions, except we specify the spaces between the guidelines rather than the guidelines themselves. Such a scheme could be shared across various 2D layouts, with some using both sets of guidelines/tracks and some using just one.
2. A scheme or schemes for specifying how children are arranged within that space. This is how we would define wrapping-flexbox, grid, masonry, Flickr, and maybe even other 2D layouts such as Pillar. The `item-*` properties and discussion in [#11480](https://github.com/w3c/csswg-drafts/issues/11480) seem to me like a great step towards a common language for these.


To those points, I think this: 
> Drop the masonry keyword from `grid-template-*`

is an important simplifying change, because it decouples track definition (point 1; what existing `grid-template-*` were doing) from item placement (point 2; what existing `grid-auto-flow` was doing).


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


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

Received on Thursday, 23 January 2025 23:31:44 UTC