Hacker News new | ask | show | jobs
by jonnyscholes 3096 days ago
CSS grid can do this! Sure not as freedom as a JS implementation but its good enough in 95% of scenarios in my experience! https://codepen.io/balazs_sziklai/pen/mOwoLg (not my code - just one of the examples on codepen)
1 comments

Sorry, but this is not true masonry because the heights of the items are fixed. Masonry layouts have dynamic height elements.
Sorry I just linked to the first one that looked right as I was on the move. Flexible height is definitely possible as we're using it that in prod. Here's another examplei found with working flexible height :)

https://codepen.io/Kseso/pen/ZJbEMe/