The CSS Podcast cover image

64: Subgrid

The CSS Podcast

00:00

Using Subgrid in Grid Template Columns and Grid Template Rows

Subgrid instructs the nested grids columns to be those of its parent grid, like it's passing on the lines as its own down to its children. It can help you align all the footer bar elements of those cards so that the longest paragraphs might set the overall track height. This also means you can have an auto template for rows, but a subgrid for columns or subgrid for rows and auto placed columns. Columns rows and gaps are passed into the spacing stays consistent. So these row or column gaps can be overwritten too.

Play episode from 02:01
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app