Short
One line.
TagA longer title that wraps
More body copy that runs onto two lines here.
TagEach card is a subgrid, so headings and tags align across the row.
If you searched css subgrid or how to align card content across a grid, subgrid lets a nested grid borrow its parent tracks so headings, text, and footers line up across items. See it live below.
Cards share row tracks so titles and tags line up.
One line.
TagMore body copy that runs onto two lines here.
TagEach card is a subgrid, so headings and tags align across the row.
.cards { display: grid; grid-template-columns: 1fr 1fr; }
.card {
display: grid;
grid-row: span 3;
grid-template-rows: subgrid;
}Nested rows align to the parent columns.
Both rows align their label and value columns via subgrid.
.list { display: grid; grid-template-columns: auto 1fr; }
.row {
grid-column: span 2;
display: grid;
grid-template-columns: subgrid;
}Keep a working layout where subgrid is unavailable.
Gate subgrid with @supports and provide a fallback.
@supports (grid-template-rows: subgrid) {
.card { grid-template-rows: subgrid; }
}