The grid-auto-flow CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid.
|Applies to||grid containers|
Items are placed by filling each row in turn, adding new rows as necessary. If neither row nor column is provided, row is assumed.
Items are placed by filling each column in turn, adding new columns as necessary.
"dense" packing algorithm attempts to fill in holes earlier in the grid, if smaller items come up later. This may cause items to appear out-of-order, when doing so would fill in holes left by larger items.