material-components-web
material-components-web copied to clipboard
[Button] Button label text should not wrap
Bug report
Button label text currently wraps if long, see spec/mdc-dialog/classes/overflow-accessible-font-size.html
Per https://material.io/design/components/buttons.html#anatomy, the button label should stay on a single line.
Screenshots
See our screenshot example: spec/mdc-dialog/classes/overflow-accessible-font-size.html
Possible solution
We should add to the button white-space: nowrap
and to the label width: 100%
.
white-space: nowrap
and min-width: max-content
worked for me.
Thank you@joyzhong
For me, this worked
white-space: nowrap;
min-width: auto;
white-space: nowrap
andmin-width: max-content
worked for me. Thank you@joyzhong
Either of these worked for me (didn't need both)
For me, this worked
white-space: nowrap; min-width: auto;
This worked for me too, thank @trdaya :)
white-space: nowrap;
min-width: auto;
This worked for me as well. Thanks, everyone!