T
27

Spent 4 hours debugging a CSS grid gap issue that was just a missing unit on a single value

I was trying to get a 20 pixel gap between cards and it kept ignoring my gap property entirely, turns out I wrote gap: 20 instead of gap: 20px and for some reason grid just silently fails on unitless values in Firefox but not Chrome, has anyone else had that specific quirk bite them?
2 comments

Log in to join the discussion

Log In
2 Comments
paigewood
paigewood13d ago
Man, the unitless gap thing got me SO bad last month. Spent an HOUR on a grid for a client's testimonial section and Firefox just REFUSED to cooperate. Turns out Chrome will happily assume you meant px if you forget, but Firefox is like "nope, you didn't specify, I'm ignoring this entirely." Felt like such a rookie mistake, especially after years of writing CSS. My coworkers still bring it up when we're doing code reviews now.
5
paul_burns
paul_burns13d ago
Right? Chrome's like "close enough, I got you" and Firefox is just that pedantic coworker who corrects your grammar in casual conversation.
4