Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

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

@hawkticehurst

Description

@hawkticehurst

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions