<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/masonry-with-animation-in-css-master-dev-blog-ek1lsjdpl" -->

---
title: Masonry (with Animation) in CSS – Master.dev Blog
description: Native CSS masonry layout via `display: grid-lanes` is arriving in browsers, but this post focuses on replicating the animated reflow behavior that Masonry.js...
canonical: https://daily.dev/posts/masonry-with-animation-in-css-master-dev-blog-ek1lsjdpl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Masonry (with Animation) in CSS – Master.dev Blog | daily.dev
og:description: Native CSS masonry layout via `display: grid-lanes` is arriving in browsers, but this post focuses on replicating the animated reflow behavior that Masonry.js...
og:url: https://daily.dev/posts/masonry-with-animation-in-css-master-dev-blog-ek1lsjdpl
og:image: https://api.daily.dev/og/posts/Ek1lSJdpL.png
og:image:alt: Masonry (with Animation) in CSS – Master.dev Blog
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Masonry (with Animation) in CSS – Master.dev Blog

**[Frontend Masters](https://daily.dev/sources/frontendmasters)** · 3 min read · 12 upvotes · 0 comments

## Summary

Native CSS masonry layout via `display: grid-lanes` is arriving in browsers, but this post focuses on replicating the animated reflow behavior that Masonry.js was known for. The technique, inspired by a Bramus demo, uses CSS anchor positioning: grid items contain a child element that covers the cell using `position-anchor` and `inset: anchor(inside)`, which is dynamic enough to animate smoothly when the grid reflows due to viewport resizing. The result closely matches the original JavaScript-powered animation without any JavaScript.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://master.dev/blog/masonry-with-animation-in-css>

## Similar posts on daily.dev

- [Animating CSS Grid Layouts with CSS Anchor Positioning](https://daily.dev/posts/animating-css-grid-layouts-with-css-anchor-positioning-1ufjfyoc1) · Bram.us · 15 upvotes · 2 comments
- [Masonry Layout is Now grid-lanes](https://daily.dev/posts/masonry-layout-is-now-grid-lanes-oyfscxlvr) · CSS-Tricks · 102 upvotes · 3 comments
- [Intro to Masonry Layout](https://daily.dev/posts/intro-to-masonry-layout-gosjaibqo) · Scott Logic · 3 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/masonry-with-animation-in-css-master-dev-blog-ek1lsjdpl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Masonry (with Animation) in CSS – Master.dev Blog","url":"https://daily.dev/posts/masonry-with-animation-in-css-master-dev-blog-ek1lsjdpl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/masonry-with-animation-in-css-master-dev-blog-ek1lsjdpl"},"datePublished":"2026-07-17T19:54:39.140Z","dateModified":"2026-07-17T19:59:03.116Z","description":"Native CSS masonry layout via `display: grid-lanes` is arriving in browsers, but this post focuses on replicating the animated reflow behavior that Masonry.js...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/819efda1aa1ed2b12974f2872b07929a?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/819efda1aa1ed2b12974f2872b07929a?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Frontend Masters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Frontend Masters","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/d34dd87208f24090bfb0917307fcf89f","url":"https://daily.dev/sources/frontendmasters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/masonry-with-animation-in-css-master-dev-blog-ek1lsjdpl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":12},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"css","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Frontend Masters","item":"https://daily.dev/sources/frontendmasters"},{"@type":"ListItem","position":3,"name":"Masonry (with Animation) in CSS – Master.dev Blog"}]}
```

