auto-fit

A repeat() keyword that creates as many tracks as fit the container, then collapses empty ones so the filled tracks stretch to use the space.

In more detail

With few items, auto-fit makes them grow to fill the row. The number of columns is roughly the container width plus one gap, divided by the minimum track size plus one gap, rounded down.

Related terms

Taught in

References