CSS masonry with flexbox, :nth-child(), and order
HTML/CSS Flexbox has no easy way of rendering items with a column layout while using a row order, but we can build a masonry layout with CSS only—no JavaScript needed—by using :nth-child() and the order property. This CSS-only way of creating a masonry (or…