Skip to content

Buttons with overflowing alpha-numeric text do not wrap #485

Open
@mwargan

Description

@mwargan

Please search for duplicate or closed issues first.

Describe the issue

A button with very long alpha-numeric text does not wrap, causing overflow.

Current Behavior

A button with very long alpha-numeric text does not wrap, causing overflow.

Expected Behavior

The button to wrap as it would with text that has spaces.

Reproduction URL

image

On the docs, just write a long alpha-numeric string in the button contents.

Fix

The following fix is suggested:

[role=button],
[type=button],
[type=file]::file-selector-button,
[type=reset],
[type=submit],
button {
  max-width: 100%;
}

Tested on our project: https://vue3-starter-storybook.netlify.app/index.html?path=/story/components-basebutton--with-overflowing-no-spaces-text

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions