Implicit grid

This is a layout system where the grid automatically expands to accommodate elements that don’t fit into the explicitly defined grid.
  • Rows or columns not declared in the explicit grid are generated automatically.
  • We can use grid-auto-rows or grid-auto-columns to define the size of the implicit rows/columns being created.
  • Ideal when the number of elements is dynamic or unknown beforehand.

Example

In this dynamic example, we can see how an implicit row is created, which takes the height from grid-auto-rows, and how an implicit column is created with its width defined by grid-auto-columns.

Select grid-auto:
ResultLive
html
css