Shaky animation with transform (not intended)

I've encountered an issue while attempting to animate a cursor using the transform property. Strangely, as the animation nears its completion, a slight shaking behavior emerges. This quirk exclusively manifests in Mozilla Firefox and is absent in Chromium. Below, you'll find the HTML and CSS code I've been working with (without animations): https://codepen.io/uneknown/pen/OJaYKLm Edit: I do the animation using transform: translateX();
unknown
CodePen
OJaYKLm
...
3 Replies
Kevin Powell
Kevin Powell•17mo ago
Could you update the codepen with the animation that's causing the issue?
Lume
LumeOP•17mo ago
Sure. https://codepen.io/uneknown/pen/OJaYKLm Can you reproduce it on your device?
Kevin Powell
Kevin Powell•17mo ago
It's the sub-pixel rendering as it moves. I see it in Chrome too, but it's not nearly as bad. As for a solution, the one I thought of doesn't work, lol. Also, the example doesn't animate at all for me in FF 🤷 (i switched it to a CSS animation to see it in action) The reason for this is firefox doesn't do any anti-aliasing in CSS animations. The best solution I can think of is to update you shadow to have a very slight blur, which sort of fakes the anti-alisasing. box-shadow: 0 0 .5px 1px black;
Want results from more Discord servers?
Add your server