An example of auto-placement using dense packing to create a grid of boxes.
The auto-placement rules place items in the following order:
If the packing mode is dense, steps 2 and 3 will work backwards to find empty spaces where the item fits.
Use Firefox Nightly/Developer Edition or Chrome Canary and you can drag the window to see the grid reflow
This Pen is a fork of rachelandrew's Pen Websafe colors meet CSS Grid (auto-placement demo).