T
4

PSA: CSS Grid subgrid broke my layout for 6 hours

I was building a card layout in Portland last week and used subgrid to align the text inside each card. It looked perfect in Chrome but totally broke in Firefox because I forgot the parent container needed display: grid too. I spent 6 hours digging through dev tools before a coworker spotted it in 2 minutes. Has anyone else hit a weird subgrid issue that made you feel like an idiot?
2 comments

Log in to join the discussion

Log In
2 Comments
evand65
evand6522h ago
My buddy spent a whole day once chasing a subgrid bug that turned out to be a missing colon...
4
gonzalez.phoenix
4 hours into a missing colon hunt I would have started questioning if I even knew how to code anymore. Did your buddy actually find the colon in some unrelated config file or was it literally right in front of his face the whole time? I once spent 3 days hunting a syntax error that turned out to be a curly brace inside a string literal and I still get mad thinking about it. The worst part is when you finally see it and realize your brain just refused to look at that spot for hours.
5