Subgrid Nested Alignment Sync
Synchronize nested grid columns with the parent using CSS subgrid for consistent alignment across complex layouts.
Code
.card-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}
.card {
display: grid;
grid-template-rows: subgrid;
grid-row: span 3;
gap: 0.5rem;
}
.card-header { font-weight: bold; }
.card-body { color: #555; }
.card-footer { font-size: 0.875rem; }Report a problem with this exampleOpens a pre-filled issue on GitHub.