T
3

Took me way too long to realize my CSS circles were all lumpy

I spent like 6 months making these little planet scenes with CSS circles and they always looked weird on the edges. Then last week I was messing around in Firefox dev tools and noticed my border-radius was set to 50% on a square but I had padding messing up the aspect ratio. Switched to a perfect 100px by 100px box with no padding and suddenly my moon looked smooth. Has anyone else fought with border-radius acting weird because of padding?
2 comments

Log in to join the discussion

Log In
2 Comments
the_richard
Wait, hold on - padding was messing up your border-radius? That's actually insane. I've been doing CSS for years and never once thought about that interaction. Six months though? That's brutal, man. I would've rage quit after the first week of lumpy circles.
3
the_eric
the_eric17d ago
Is it just me or does this kind of thing happen way more often than it should? You spend hours learning one part of a tool and then a tiny detail you'd never think of throws everything off, like how the screen on my phone will randomly freak out if I hold it a certain way. It's like the universe's way of reminding us nothing's ever as simple as it looks, even when you think you've got it figured out.
0