question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Button] small button text not vertically centered with Roboto

See original GitHub issue

Duplicates

  • 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:

  1. Use <Button size="small">text</Button>
  2. Observe text

Context 🔦

Codesandbox link

Screenshots: Medium (alignment ok) medium

Small (text too high) small

Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
danilo-lealcommented, Jan 11, 2022

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 and good first issues labels and look around if any of them get you interested!

1reaction
danilo-lealcommented, Aug 12, 2022

Won’t it be better to have logos like v6 and on hold?

Yup, I guess so! Thanks for the heads up @gauravsoti1!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found