Buttons have incorrect sizes
See original GitHub issueDescribe the bug While documenting https://github.com/github/primer/issues/263, I realized that Primer React buttons have incorrect sizes when compared to Figma references and Primer CSS implementation, usually being 2px taller than expected.
This issue is probably due to borders being ignored in the calculation after specifying line-height + padding.
The total height of regular buttons should be 32px
on the medium size, 28px
on the small size, and 40px
on the large size.
Related
https://github.com/github/primer/issues/41 (on “Using borders”)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Incorrect CSS Button Height computing - Stack Overflow
I want these buttons to have a height of 32 pixels and get rid of the space in between the 2 buttons. I...
Read more >Optimal Size and Spacing for Mobile Buttons - UX Movement
If they don't have an optimal size and spacing, it's no wonder users are missing their target or hitting the wrong button.
Read more >QMessage box buttons size/others have incorrect width after ...
Once I do that, when I look at my buttons, they are all at "minimum" width size. QMessageBox "OK" button is like 20...
Read more >Problem with button size - Jotform
I have a form on http://www.drmartinperez.com/index.htmlThe embedded code is: <script type="text/javascript" src="https://form.jotform.u...
Read more >Button - dbc docs - Dash Bootstrap Components - Faculty AI
You can adjust the width of the block button can be achieved using grid column width classes. This button is made half-size using...
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
Also the icon sizes don’t correlate to the expected button sizes. So I’m assuming we don’t change the size of icons for buttons which have them.
https://github.com/primer/octicons/blob/main/docs/content/packages/react.mdx#sizes
This is all fixed. Is the fix ideal? Maybe not. But the issue doesn’t exist any more with the new Button component