You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we use a Button component with both text and an icon, the vertical alignment of the icon seems to change depending on Button size variation.
For sizes "sm" and "md" the icon is vertically aligned to the bottom of the text. For sizes "lg" up, the icon is vertically centered with the text. I've prepared a screenshot where I've added a background and zoomed in to showcase the difference:
I don't know if this is a bug or a design choice. The only guideline I've found on a website is related to icon alignment with text https://carbondesignsystem.com/guidelines/icons/usage#alignment
For me, it makes sense to apply the same rule to buttons. The icon aligned to the bottom of the text visually seems slightly off. However, if this is intentional please let me know :)
Package
@carbon/react, @carbon/styles
Browser
Chrome, Firefox
Package version
v1.47.0
React version
v18.2.0
Description
When we use a Button component with both text and an icon, the vertical alignment of the icon seems to change depending on Button size variation.
For sizes "sm" and "md" the icon is vertically aligned to the bottom of the text. For sizes "lg" up, the icon is vertically centered with the text. I've prepared a screenshot where I've added a background and zoomed in to showcase the difference:
I don't know if this is a bug or a design choice. The only guideline I've found on a website is related to icon alignment with text
https://carbondesignsystem.com/guidelines/icons/usage#alignment
For me, it makes sense to apply the same rule to buttons. The icon aligned to the bottom of the text visually seems slightly off. However, if this is intentional please let me know :)
Reproduction/example
https://stackblitz.com/edit/github-3qj9uz?file=src%2FApp.jsx
Steps to reproduce
Suggested Severity
None
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: