-
-
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] small button text not vertically centered with Roboto #29965
Comments
I can notice it. It could be a regression after the |
The CodeSandbox I've linked to above uses MUI |
I suppose it could be related to the text line-height. The tricky thing is that it seems the overall Button height is composed of the text line-height. In the below example, the texts are without line-hight which makes the Buttons smaller. They seem to be centered though. If we were about to remove the typography variant |
At this point, I suggest only adjusting to |
I had noticed the same problem, on macOS 12, Chrome v96! I'm glad we have an issue open about this problem. @apokusin thanks for the care ❤️ . |
can i work on this issue?? |
#30240 This is already on hold. |
I am a beginner and target gsoc this year..can you guide me that how i should start?? |
Hey @shagungarg0, thanks for the willingness to start working on this issue. However, @abhinav-22-tech already took the lead and opened the PR for it but given it is a breaking change, we put it on hold until the next major (can't give you a prediction when that will happen exactly though). To find more good opportunities to contribute and learn, you can filter the issues with |
I am new to the contribution. I want to work in this issue. May I? |
@siriwatknp Should this still have a good first issue label? Won't it be better to have logos like |
Yup, I guess so! Thanks for the heads up @gauravsoti1! |
Removing the "on hold" label @DiegoAndai started the work on Material UI v6. It feels 1px off too in https://mui.com/material-ui/react-button/#material-you-version With 1px less on padding-bottom: Now, the problem seems to be Roboto font related. If change the font to I suspect we need that https://web.dev/css-size-adjust/#descent-override |
@oliviertassinari should we fix this for v6 only? or for v5 as well? |
before https://codesandbox.io/s/iconlabelbuttons-material-demo-forked-m96yo?file=/demo.tsx after @font-face {
descent-override: 15%;
font-family: "Roboto"; (after) https://codesandbox.io/s/iconlabelbuttons-material-demo-forked-8vtvv3?file=/public/global.css:34-56 Now, the challenge is, I don't see how we can customize
@DiegoAndai At this point, I think we could focus most of our energy on v6. |
Another CSS property that ca help |
Current behavior 😯
The text inside of a button with
size="small"
is not centered vertically. This is especially obvious when used with an icon or a contained/outlined button.Expected behavior 🤔
The text inside of a button with
size="small"
is centered vertically.Steps to reproduce 🕹
Steps:
<Button size="small">text</Button>
Context 🔦
Codesandbox link
Screenshots:
Medium (alignment ok)
Small (text too high)
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: