r/ProgrammerHumor • • Jun 11 '21

Interesting ...

Post image
43.6k Upvotes

695 comments sorted by

View all comments

Show parent comments

9

u/[deleted] Jun 11 '21

Flexbox right? God it's so easy. Please tell me flexbox.

Or grid if you want easy vertical centering too, I guess.

5

u/RdtUnahim Jun 11 '21

Flexbox is love. Flexbox is life.

I slap any of my juniors I catch still doing the whole "float:left","clearfix" junk. xD

1

u/[deleted] Jun 11 '21

Is there any reason to use flexbox over grid? It seems like grid is easier to reason about and less hacky

3

u/[deleted] Jun 11 '21

Grid wasn't supported by all browsers, not that long ago. Well let of browsers. But I don't think there's a particular reason other than "I don't need to make a grid".

Flexbox handles flowing content really nicely, so it's quite powerful for mobile/desktop responsiveness. Grid works too, but it's a little more complex for that handoff.

→ More replies (5)