Subgrid
noun
say it: “SUB-grid” /ˈsʌbɡrɪd/
A value that lets a grid inside a grid item reuse its parent's rows or columns, so pieces in separate cards line up with each other.
What is subgrid?
Subgrid lets a grid item's own grid reuse its parent's rows or columns, so content in separate cards lines up perfectly.
.card { display: grid; grid-row: span 3; grid-template-rows: subgrid; } /* titles, text, buttons line up across cards */
In a sentence
- “With subgrid, the titles, prices and buttons line up across all the cards, even when one title is longer.”
Level: Freelancer · More CSS terms at this level
Updated