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.
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 button line-height, we should probably add a minHeight to each component size variant so they don't shrink. Does that make sense?
If we were about to remove the typography variant button line-height, we should probably add a minHeight to each component size variant so they don't shrink. Does that make sense?
At this point, I suggest only adjusting to line-height: 1.5 for size small because changing to use minHeight in v5 might be a breaking change. In v6, we can revisit the size implementation again.
Duplicates
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:
<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: