3 ms·
Use CSS Grid for a grid - like a spreadsheet with multiple rows and columns. Use Flexbox for a single row or column. So you might have a 10x10 grid and in the
by irrational 7y ago
Use CSS Grid for a grid - like a spreadsheet with multiple rows and columns.
Use Flexbox for a single row or column.
So you might have a 10x10 grid and in the cell in row 3 column 5 you might want to have a bunch of images that are all in a row. Use Flexbox to layout those images.
- nailer 7y agoPersonally I can't be bothered and use grid for both. Why have a separate syntax for one dimension?
- irrational 7y agoHere are 10 reasons why. https://stackoverflow.com/questions/55064488/what-are-the-areas-covered-by-flexbox-which-are-difficult-or-impossible-to-achie https://stackoverflow.com/questions/55064488/what-are-the-ar...
- nailer 7y agoThanks. Reconsidering my position. I think I'll still do div {display: grid }; in my basic styles but be aware of some cases where flex may be more appropriate.