31
Had a senior dev tell me to stop over-engineering my CSS grid layouts
He said I was wasting time with complex patterns when flexbox could handle 90% of use cases. I argued back for weeks until I spent 3 hours refactoring a dashboard page and cut my code by 40 lines. Anyone else been told to simplify something and fought it only to realize they were right?
3 comments
Log in to join the discussion
Log In3 Comments
wendy_clark1mo ago
Flexbox is just easier to maintain and debug in my experience.
4
max3881mo ago
Totally feel you on this. I've been burned so many times by float-based layouts where one little change breaks the whole thing, and you're left hunting through the CSS for hours. Flexbox just lets me say "hey, put these three boxes in a row and center them" and it actually works without fighting the browser. Debugging is way easier too since you can see the flex properties right there in dev tools. Honestly, once I switched to flexbox for my projects, I never looked back.
7
henderson.hugo24d ago
That bit about "one little change breaks the whole thing" hits hard, man. I've had 3-column floats collapse into a nightmare just because I added a padding property somewhere. But here's what I'm curious about - when you're debugging a complex flex layout, how do you handle the whole "flex-shrink vs flex-grow" dance? I feel like those are the two properties that still trip me up sometimes, especially when I'm trying to get items to wrap properly on smaller screens. Do you just set them to 0 and 1 and hope for the best, or do you actually use specific values?
1