Uncentered text/icons when `vscode-button` has a width greater than 300px
See original GitHub issueDescribe the bug
The button
element within the shadow DOM of a vscode-button
currently has a max-width of 300px defined.
This means that when a vscode-button
has a width of 100% inside a parent container with a width greater than 300px it results in un-centered text/icons.
To reproduce
Add a vscode-button
to a div
.
Set the vscode-button
width to 100% and set the div
width to 500px.
Expected behavior
VS Code buttons should have center-aligned text/icons no matter their width.
Current behavior
VS Code buttons will only have centered text/icons up to 300px in width.
Screenshots
With max-width of 300px:

Without max-width:

Desktop (please complete the following information):
- Toolkit Version:
v1.0.0
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Microsoft vscode-webview-ui-toolkit Issues - Giters
Radio group does not have the correct value when submitted in a form. ... Uncentered text/icons when `vscode-button` has a width greater than...
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 Free
Top 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
@chaiwattsw absolutely! Go for it 🙂
Thanks!