CSS Masonry: We have enough ways to arrange rectangles

In the world of those who build out the web platform, and CSS in particular, there’s some drama.

  1. The Webkit team at Apple have put forth a compelling proposal for how to make the Pinterest-style layout (aka, ‘masonry’) by building on CSS grid.
  2. The Chrome team at Google have an alternative approach to the same problem, introducing a new ‘masonry’ display type as a peer to flex and grid.

The folks at the ShopTalk Show talked through the state of the debate with a Google rep in episode 614.

My take is lukewarm:

  • “Masonry” layout is too specific a use case and not valuable enough to build in to the web platform.
  • I needed grid and flex a million times before they came along. I don’t think I’ve ever found myself needing masonry layout.

If you need it, that’s great. It doesn’t have to be for everyone. There is a cost to adding to the platform though.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)