# Grid Lanes (CSS-only masonry)

Status: Safari 26.4 (April 2026); Chrome, Edge and Firefox behind flags. Not Baseline.  
Source: https://webkit.org/blog/17862/webkit-features-for-safari-26-4/  
Page: https://designforai.dev/css/grid-lanes

A masonry-style layout where items flow into the shortest column lane, expressed with `display: grid-lanes` and the familiar grid track syntax. No JS masonry libraries.

## HTML

```html
<div class="fx-060"><div style="height:80px">1</div><div style="height:140px">2</div><div style="height:60px">3</div><div style="height:120px">4</div><div style="height:90px">5</div></div>
```

## CSS

```css
.fx-060 {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(120px,1fr));
  gap: 10px;
  font-family: system-ui
}
@supports (display: grid-lanes) {
  .fx-060 {
    display: grid-lanes
  }
}
.fx-060 div {
  background: #e0e7ff;
  border-radius: 8px;
  display: grid;
  place-items: center
}
```

Fallback: The regular grid above is the fallback (rows align, gaps appear under short items).

## Prompt

For Pinterest-style layouts use `display: grid-lanes` with `grid-template-columns: repeat(auto-fill, minmax(...))` inside `@supports (display: grid-lanes)`, with a normal grid as the fallback. Safari 26.4+ only in 2026-09; do not add a masonry JS library.
