[Button] small button text not vertically centered with Roboto
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
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:
- Use
<Button size="small">text</Button>
- Observe text
Context 🔦
Screenshots: Medium (alignment ok)
Small (text too high)
Your environment 🌎
`npx @mui/envinfo`
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:12 (7 by maintainers)
Top Results From Across the Web
android - button text not getting centered vertically in button
Your button is too short to fit the text properly. Increase the layout_height and the text should be centered.
Read more >Text and typography — Vuetify
Button. Caption. Overline. These classes can be applied to all breakpoints ... Left aligned text on viewports sized SM (small) or wider.
Read more >Explore text properties - Figma Help Center
Text properties allow you to control everything from the appearance and position of text, to resizing behavior and OpenType features.
Read more >Buttons with small heights do not display text centered vertically
There appears to be a minimum margin of about 5 pixels between the top border of the button and the text. As a...
Read more >Full Text of Text Class's textclass.css - DLXS
closeButton { font-family: verdana, arial, helvetica, sans-serif; ... { text-align: center; } .rmarginlineno { vertical-align: top; float: right; ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
good to take
andgood first issues
labels and look around if any of them get you interested!Yup, I guess so! Thanks for the heads up @gauravsoti1!