{
  "id": "grid-row-span-masonry",
  "name": "Grid Row-Span Masonry",
  "category": "layouts",
  "tags": [
    "masonry",
    "grid",
    "row span",
    "reading order",
    "pinterest"
  ],
  "description": "Masonry built on CSS Grid with tiny rows and per-item row spans, so items keep left-to-right order.",
  "url": "https://copy-css.com/snippets/grid-row-span-masonry",
  "markdown": "https://copy-css.com/snippets/grid-row-span-masonry.md",
  "html": "<div class=\"grid-masonry\">\n  <div style=\"--rows: 10\"></div>\n  <div style=\"--rows: 16\"></div>\n  <div style=\"--rows: 8\"></div>\n  <div style=\"--rows: 13\"></div>\n  <div style=\"--rows: 9\"></div>\n  <div style=\"--rows: 14\"></div>\n  <div style=\"--rows: 11\"></div>\n  <div style=\"--rows: 7\"></div>\n  <div style=\"--rows: 12\"></div>\n</div>",
  "css": "/* Each item spans --rows rows of 8px: set it from the item's height */\n.grid-masonry {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));\n  grid-auto-rows: 8px;\n  column-gap: 16px;\n}\n\n.grid-masonry > * {\n  grid-row: span var(--rows, 20);\n  margin-bottom: 16px;\n}",
  "features": [
    "CSS Grid",
    "custom properties"
  ],
  "customProperties": []
}
