css-grid-lanes

Installation
SKILL.md

Native Masonry with CSS Grid Lanes

Build responsive masonry and brick layouts with native CSS Grid Lanes, based on https://piccalil.li/blog/native-masonry-layouts-with-css-grid-lanes/. This covers lane definition, automatic placement, spanning, fit tolerance, direction, and subgrid alignment; it does not provide a JavaScript masonry implementation. It uses native CSS with no package or credential dependencies.

When to Use

  • Build a Pinterest-style gallery with unequal-height items.
  • Replace JavaScript masonry positioning with native CSS where supported.
  • Create a responsive card layout without shared row heights.
  • Let featured cards span multiple masonry columns.
  • Balance compact lane packing against preserving source order.
  • Create a horizontal brick layout with grid-template-rows.
  • Align nested card content with a parent masonry grid using subgrid.

Prerequisites

Installs
1
GitHub Stars
11
First Seen
14 days ago