# Grid auto flow

Decides how unplaced items fill the grid.

## What does `grid-auto-flow` do?

`grid-auto-flow` decides how items fill the grid when you don't place them: row by row, column by column, and whether to fill gaps (`dense`).

```css
.gallery { display: grid; grid-auto-flow: dense; }   /* fill holes left by big items */
```

Level: Journeyman · [More CSS terms at this level](https://www.ask-codey.com/glossary/subjects/css/journeyman)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/grid-auto-flow
