Re:Learn CSS Grid with a virtual garden game
by micromacrofoot on Monday June 03, 2024 @01:06PM
(#40564714)
Flexbox generally tends to be great for a single row/column layout, grid excels at multicolumn/row (especially considering subgrid)
One of the most useful features of grid that replaces flexbox, in my experience, is auto-fit and auto-fill, which are great for "card" style layouts. You can use flexbox for these, but the treatment of wrapping items in non-full rows was always a point of frustration for me. This is even better if you can utilize subgrid to align the card contents.
One of the most useful features of grid that replaces flexbox, in my experience, is auto-fit and auto-fill, which are great for "card" style layouts. You can use flexbox for these, but the treatment of wrapping items in non-full rows was always a point of frustration for me. This is even better if you can utilize subgrid to align the card contents.
https://css-tricks.com/auto-sizing-columns-css-grid-auto-fil...