News for hackers. Stuff that matters.
Re:CSS Tips by joshspankit on Monday April 26, 2021 @03:43PM (#26947091)
Grid is way better than flexbox. All hail CSS-Grid.
Re:CSS Tips by sodapopcan on Monday April 26, 2021 @07:18PM (#26949565)
Grid 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.
Re:CSS Tips by eyelidlessness on Monday April 26, 2021 @04:31PM (#26947683)
They have many overlapping capabilities, but there are things flexbox can do which grid cannot. For instance, flexbox can wrap with dynamically sized children.
Re:CSS Tips by perardi on Monday April 26, 2021 @04:11PM (#26947432)
Got a citation for this?

I’ve seen this said, and for the life of me, I can’t find an actual reference for it.

Re:CSS Tips by joshspankit on Monday April 26, 2021 @04:13PM (#26947470)
Citation: Purely subjective personal experience / opinion.

At least it’s first-hand.

Re:CSS Tips by have_faith on Monday April 26, 2021 @05:37PM (#26948520)
They solve different problems.
Re:CSS Tips by runarberg on Monday April 26, 2021 @06:04PM (#26948856)
In 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.

Re:CSS Tips by jonny_eh on Monday April 26, 2021 @04:36PM (#26947755)
Also harder to learn.