Button: wired spacing when line breaks
See original GitHub issue- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
There is additional space on the button left and right (see screenshot)
Expected Behavior 🤔
The button should shrink as without line breaks
Steps to Reproduce 🕹
Steps:
- Please note the
maxWidth
on the surroundingdiv
. - https://codesandbox.io/s/material-demo-3do1p?file=/demo.js
<div style={{ maxWidth: 170 }}>
<Button variant="contained" color="primary">
Send to somewhere
</Button>
<Button variant="contained" color="primary">
Send to some
</Button>
</div>
Context 🔦
THis issue might be related: https://github.com/mui-org/material-ui/issues/17494
Your Environment 🌎
Tech | Version |
---|---|
Material-UI | v4.9.9 |
React | 16.13.1 |
Browser | Linux Chrome Version 80.0.3987.162 (Official Build) (64-bit) |
TypeScript | |
etc. |
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Button: wired spacing when line breaks · Issue #20459 - GitHub
The issue is not about making the smaller one full-width but the additional space WITHIN the first button is unexpected and too much....
Read more >Multiline HTML input button with line break adds unwanted ...
drinkButton { width:94px; height: 67px; font-size:1em; margin: 0px 6px 6px ... white-space: normal; padding: 0px; vertical-align:bottom; }.
Read more >How to Create Button with Line Breaks - W3docs
Another way of adding a line break is using the CSS word-break property, which specifies how words should break when reaching the end...
Read more >Remove extra whitespace caused by line break within a button
If the button text is too long and needs to be displayed on two lines, the padding of the button will automatically change...
Read more >line spacing ??? - Beginners' Questions - Inkscape Forum
If that does not resolve the issue, activate the Tt button ("outer" text style) and set the font height to something small and...
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
Tip, check the full-width option
The button stops shrinking.