Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
by beardedetim on Tuesday April 23, 2024 @05:23PM
(#40137464)
I really like this concept of `flex-grid` because that's exactly what this display would be.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
by datavirtue on Wednesday April 24, 2024 @12:36PM
(#40146541)
That would be too simple and clean.
A better approach might be to lean on the "grid" naming, but still silo it off via an own display directive (a bit like "block" and "inline-block" have shared properties, but also mutually exclusive behaviours)
So maybe an own `display: flex-grid;` could be an interesting solution?
This separate layout mode would avoid "result-specific" nomenclature like "masonry", and could lean on both flexbox & grid to achieve that look: - using `grid-auto-flow` to set a "masonry axis" & distribution logic - using _either_ `grid-template-columns` or `grid-template-rows` to specify the "lanes" - and to make my frankensteinian display-mashup even worse (or genius! for you to decide), the grid items could in turn abuse `flex-grow, flex-shrink, flex-basis` to control their height/width within the main "masonry" axis