-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Button] Vertical text alignement issue on Firefox #23637
Comments
@jasminnancy Do you have a better reproduction? It almost displays aligned for me on Firefox 83 macOS: Firefox 82 Windows 10 Vertical alignment of text inside a button is tricky! Different fonts have a different alignment of the baseline compare to the ascender and descender. |
This is definitely an inconsistency with some fonts @jasminnancy , especially prevalent when icons are in there as well This is actually a pretty old "issue" which has to do with the fact that FF is implementing font metrics accorrding to spec, while the Chromium browsers are not. See
|
@lcdss Do you have a codesandbox? Is it related to a custom font? |
A simple workaround: just not to use roboto would fix that.
|
Current Behavior 😯
Buttons do not render properly with correct padding. As you can see, the text looks raised and is higher than it should be. While this seems like a small issue, it is noticeable when using rounded buttons and is an issue in production.
No amount of `button::-moz-focus-inner` or any other found solution does the trick.
Expected Behavior 🤔
Button should render with text centered.
Steps to Reproduce 🕹
Steps:
Context 🔦
This is an issue, mostly, for buttons that have rounded edges. It's fairly noticeable and frustrating, especially since we can't get it to stop doing this. Can you possibly add Firefox support for this so it stops happening automatically?
Your Environment 🌎
The text was updated successfully, but these errors were encountered: