3 ms·
CSS Grid complements Flexbox by providing two-dimensional grid-based layout capabilities. Flexbox can only lay things out along one axis, and although you can d
by mathw 10y ago
CSS Grid complements Flexbox by providing two-dimensional grid-based layout capabilities. Flexbox can only lay things out along one axis, and although you can do a lot of things that look a bit grid-like with it (usually involving multiple flex containers), it doesn't actually think in grid terms to do it.
So with CSS Grid and a few media queries it's pretty trivial to have a full-on, really robust grid layout on a desktop site and have it gracefully reflow itself into a column layout to render on a phone, with source element ordering being completely irrelevant.
Or at least, it will be when the mobile and desktop browser support picture for it is good enough.