Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
by phkahler on Tuesday April 23, 2024 @10:15AM
(#40132254)
If people want to choose where things land they can do that. Therefore I assume we're talking about a scenario where the items are not known in advance - i.e. they come from a database query or similar. Is there no way to SELECT every Nth item when doing a query? Return a count and select where count MOD N = k? Dump those in a column.
This feels like "I want my layout algorithm to be part of the standard." and if you don't think so, see the part where they also want the equivalent of "colspan = 2" for some itmes - possibly with another pattern to define which ones.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
by micromacrofoot on Tuesday April 23, 2024 @10:43AM
(#40132542)
> "I want my layout algorithm to be part of the standard."
I mean, yes... it's a very common layout algorithm so it gets standardized
If you just plop your items into columns, the first items will all appear in the first column and the last items will all appear in the last column (left to right), which is not the behavior you want.
To my knowledge, the correct behavior cannot currently be created in CSS alone. (Or if it can, it must be a wild hack.)