Hacker News new | ask | show | jobs
by marc_omorain 3391 days ago
What's the difference between grids and flexbox? To the untrained eye, they look like two alternate layout systems where one should suffice.
3 comments

Very nice. Thanks.
Basically grids is a 2D layout system, while flexbox is a 1D constraint system that results in stuff happening on the second dimension. They're complementary and it would be foolish to use one when the other is needed.
Does this mean we're finally coming full circle after all these years back to Tables for layout?
No CSS Grid Layout is far, far more powerful and versatile than tables ever were. Certain significant classes of layout problems that were either a major pain or even outright impossible with current CSS tools are about to become fairly straightforward.
some of us never left
Flex is only built and meant for handling linier layout, either up and down or left right, and ot does so well with good flexibility and options and developer experience. Or at least compared to the other possible options. It was never intended for making grid layouts, which people are often trying to make it do, because all the other options are so lacking.