Mr. Karim’s plan for Grandma Marni’s new stall: write or paint the grid-template-areas map, then see what the browser says to an L-shaped area, rows of…
Why it matters
The most readable way to lay out a page skeleton: the CSS looks like the layout, and the phone version is just a rewritten map. But the "every area must be a rectangle" rule often leaves people wondering why the grid collapsed entirely.
The key idea
Draw the layout as a map, but every area must be a rectangle
Common mistakes
One area painted as an L, and the whole grid collapses into a stack An L, a T or a split shape makes the browser drop the whole grid-template-areas, not just that area. Keep each name one rectangle; if you need an L, split it into two areas.
grid-template-areas is ignored though it looks right Count each string’s cells: every row must match, one off and the declaration is dropped. (grid-template-columns may list a different number: extra columns from the map are auto-sized.)
Cards keep coming, the areas are full and have no names left Areas suit a fixed skeleton (header/sidebar/main/footer). Leave items of unknown count to auto-placement, or use a separate grid with repeat(auto-fit, minmax(…)).
Try it in this playground
Pick a brush, then paint a cell The map is rewritten, and the real good moves.
Make one area an L yourself The whole declaration is dropped: every good falls into one pile.
Take "aside" off the map (turn its cells into dots) The cash tin is still there, but lands in an implicit track outside the map, outlined red.
Move the number of parcels with no grid-area Auto-placement fills the dot cells first, then makes new implicit rows.