Masonry layout

Mats Palmgren / filed under HTML & CSS

This is a proposal to extend CSS Grid to support masonry layout in one of the axes while doing normal grid layout in the other. I’ll use grid-template-rows/columns: masonryto specify the masonry-axis in the examples (and I’ll call the other axis the grid-axis). Here’s a simple example:

Subscribe to newsletter

Design and frontend links delivered to your inbox every day and week. No spam, unsubscribe at anytime.

Choose frequency