Re:Faster Layouts with CSS Grid and Subgrid
by kerkeslager on Friday October 18, 2019 @02:26PM
(#21293851)
> If your layout is different enough that you’ll need media queries then you’ll want to use grid anyways.
Ehhh, not really.
A common case is items laid out as boxes. On desktop I want them in rows of 3 to 5 (perhaps more on wider screens, but often this starts to look stupid beyond 4 or 5 so you set a max width for the container). And in mobile we want 1 item per row. With flexbox, you just change the width of the items from 33.33% to 100% in the media query, maybe with some adjustments to margins, and you're golden.
If your layout is different enough that you’ll need media queries then you’ll want to use grid anyways.