Firefox button height transition bug fix?

For some reason my css works fine in chrome, but in firefox I get this weird bug causing the button to weirdly stretch vertically. https://codepen.io/23chromosomes/pen/jOoqLwV
No description
No description
No description
5 Replies
Entity808
Entity808OP7mo ago
Any reason what might cause this weird behviour in firefox?
capt_uhu
capt_uhu7mo ago
Firefox seems to need a default state for the transform to transition smoothly. Adding a transform: translateY(0); on button smooths things out for me. Also understand that .1rem computes out to 1.6px which means subpixel rendering which is always a bit janky on the web. Last thing is make sure you are only calling out the things you want to transition in the transition short hand. all is tempting but it prepares the browser to do a lot more than you probably need.
Entity808
Entity808OP7mo ago
By body root is 10px in my real site as 1rem. Thank you, will try to apply this to fix it. Seems to have solved the issue, thank you.
vince
vince7mo ago
That might be bad for accessibility. Do you mean you set the font size to 10px on the root or 0.625%?
Entity808
Entity808OP7mo ago
62.5%
Want results from more Discord servers?
Add your server