2 ms·
Flexbox for 1-dimensional layout, and Grid for 2-dimensional layout
by hobofan 9y ago
Flexbox for 1-dimensional layout, and Grid for 2-dimensional layout
- BrandoElFollito 9y agoThis is the traditional answer but I wonder why. What does flex have that one cannot do with grid?
- hobofan 9y agoI guess if you really try, you can probably do all/most things flex can do with grid. However grid isn't really meant to have flexible responsive grid-cells, e.g. "how will the item1 grow in relation to item2 if we have additional space available?". Grid is more meant for scenarios where you wan't to completely change the layout of components of the site when you cross breakpoints, and when you have to do 2d gride-like layout (...duh!).