Ahmad Shadeed avatar Ahmad Shadeed

Should masonry be part of CSS grid?

Screenshot of “Should masonry be part of CSS grid?”

An exploration of examples showing masonry as both a part of CSS Grid and as its own display type.

Ahmad provides compeling use cases and code examples showing that making masonry layout “just” a specific use case for CSS Grid could be the best choice.

So… that's not what I thought a month ago… 😅

Anyway, the most important part in Ahmad's article is in the end:

The masonry style isn’t very common. You might say, but that’s because we don’t have the right tools to do it in CSS. Well, once something is easy to do by everyone, it will become less popular.

I hope this is true. I don't like masonry (or “collapse”) layout most of the time. Even while reading Ahmad's article, I thought “why would anyone use masonry for the footer, or the FAQ?”. This layout only makes sense (to me) if there is no logical order between contents, for example the images gallerie for the recipes.