Hacker News new | ask | show | jobs
by irrational 2463 days 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.

1 comments

Personally I can't be bothered and use grid for both. Why have a separate syntax for one dimension?
Thanks. 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.