3 ms·
Is it worth it to use flexbox now that grid exists? I’m not sure if they solve the same kind of problems.
by jdkjs 5y ago
Is it worth it to use flexbox now that grid exists? I’m not sure if they solve the same kind of problems.
- frosted-flakes 5y agoDifferent problems, 1D vs 2D. There's some overlap, but they attack the problem from different directions. Flex child elements determine their own size, while the parent grid determines the size of the child grid elements.
- chrismorgan 5y agoThere’s a lot of overlap between the two, but there are also various problems that one can solve that the other can’t. Grid is 2D with limited 1D-like auto placement, whereas Flex is 1D with limited 2D-like wrapping.