20
I finally stopped using flexbox for everything after a grid layout broke on me 3 times in one afternoon
Trying to force a magazine-style layout with flexbox made my columns collapse into a mess on mobile, so I rewrote it in 20 lines of CSS Grid and it worked perfectly, has anyone else had that moment where you realize you were using the wrong tool the whole time?
2 comments
Log in to join the discussion
Log In2 Comments
michaeladams2d ago
Yeah exactly, flexbox is great for one-dimensional stuff but once you need columns that actually stay where you put them you're basically fighting against the browser. CSS Grid just makes way more sense for layouts where stuff needs to line up both ways.
-1
the_taylor2d ago
Mike dropping truth bombs here. I'm still out here using flexbox for everything like a clown. Grid looks cleaner, works better. But my brain just refuses to learn it properly. Every time I open a grid tutorial my eyes glaze over. Flexbox is like that old pair of shoes you know you should throw out but they're just so comfortable. Someday I'll make the switch. Maybe.
4