16
CSS flexbox ate 6 hours of my life over a missing min-width
Last Tuesday I was building a simple card layout for a portfolio piece. Two cards side by side, fine on desktop, stack on mobile. Everything looked right in my head. But on actual phones the text kept squishing into a skinny column and the button wrapped weird. I tried gap, padding, media queries, even deleted the whole section and rebuilt it once. Then after 6 hours I found a random forum post about flex items needing min-width: 0 to shrink properly. That was it. One line of CSS. Has anyone else been burned by flexbox doing something that looks totally correct in preview but breaks on a real device?
0 comments
Log in to join the discussion
Log In0 Comments
No comments yet
Be the first to share your thoughts on this discussion.