Grid by Example

Everything you need to learn CSS Grid Layout

Subgrid on columns, implicit grid rows

To define a subgrid on columns only use the value subgrid on a grid item of the parent as the value of grid-template-columns. The rows can now be defined with a track listing as normal of grid-template-rows or an implicit grid can be used as usual. Any grid created for rows will be for the subgrid only, and the parent grid row containing the subgrid will grow to be large enough to contain the content (assuming it has an auto or other content-based size).

Read the specification | View example as full page

See the Pen Grid by Example 2.2: subgrid columns, implicit grid rows by rachelandrew (@rachelandrew) on CodePen.