question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncentered text/icons when `vscode-button` has a width greater than 300px

See original GitHub issue

Describe 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:

vscode-button-max-width

Without max-width:

vscode-button-max-width-removed

Desktop (please complete the following information):

  • Toolkit Version: v1.0.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hawkticehurstcommented, Jul 29, 2022

@chaiwattsw absolutely! Go for it 🙂

0reactions
chaiwattswcommented, Jul 30, 2022

@chaiwattsw absolutely! Go for it 🙂

Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found