17 ms·
Grid is way better than flexbox. All hail CSS-Grid.
by joshspankit 6y ago
Grid is way better than flexbox. All hail CSS-Grid.
- perardi 6y agoGot a citation for this? I’ve seen this said, and for the life of me, I can’t find an actual reference for it.
- joshspankit 6y agoCitation: Purely subjective personal experience / opinion. At least it’s first-hand.
- eyelidlessness 6y agoThey have many overlapping capabilities, but there are things flexbox can do which grid cannot. For instance, flexbox can wrap with dynamically sized children.
- jonny_eh 6y agoAlso harder to learn.
- have_faith 6y agoThey solve different problems.
- runarberg 6y agoIn general: Flex is for flowing content, grid is for structured. You can do some awesome wrapping with flex that is impossible with grid. Also `margin-inline-start: auto` is pretty rad using flex, although you can do something similar with `justify-self` with grid. A good use case for flex would be a list of tags, that need to wrap.
- sodapopcan 6y agoGrid is not a replacement for Flexbox, it compliments it. Flexbox excels when you are only concerned with one dimension, grid excels when you're concerned with two (ie, a grid!) And yes, there is overlap.