The CdxButton component currently has an explicit max-width of 448px via the @size-width-button component-level token. This token has a comment:
Note, that this is a slight amendment from WikimediaUI Base from 28.75em = 460px to 448px
This max-width keeps the button from being absurdly long, and T309825 improved Button styles at that max-width by truncating text via an ellipsis. However, the max-width can cause issues at smaller viewport widths or when a button exists in a narrow container. For example, here's the configurable Button demo on a small screen:
It the Button had a max-width of 100%, we'd get this instead:
This could also help in the circumstance of a centered, full-width button, as demonstrated in the Figma spec (note that this Button has a width of 624px):
For historical context: the OOUI ButtonWidget has no max-width.
Acceptance criteria
- Discuss the current max-width and determine if it should remain, if max-width should be 100%, or if it should be some other value
- Make the change if needed