T
12

Spent 3 hours on a circle shadow before I realized my math was wrong

I was trying to make a neon glow effect around a perfect circle in pure CSS, thinking it would be a 10 minute job. Kept getting this weird flat spot on the bottom right corner that drove me nuts. After messing with border-radius and box-shadow for way too long, I realized my circle's width and height were off by 2 pixels because I used a percentage instead of a fixed unit. Anyone else ever waste that much time on something this dumb?
2 comments

Log in to join the discussion

Log In
2 Comments
webb.stella
Oh man, percentage vs fixed units always messes me up too. Did you catch it because the shadow looked off or did you actually measure the pixels?
1
the_viola
the_viola11d ago
Hold up, TWO pixels?! That's wild. I would've been staring at that flat spot for hours too before I ever thought to check the actual math.
0