Resolves every item to a placement on a grid columns wide, in the order given.
Resolves every item to a placement on a grid columns wide, in the order given.
Fixed items are placed first, where they asked to be, so a flowed item never lands on top of one. Each flowed item then takes the first run of free cells, in reading order, that its spans fit into, starting the search where the previous flowed item ended — CSS grid's "sparse" auto-placement, so the flow never goes back to fill an earlier hole. A column span wider than the grid is narrowed to the grid. Rows grow as far as the items need; the caller decides how many row tracks to solve.