Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mwargan opened this issue Mar 7, 2024 · 1 comment
Open

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

mwargan opened this issue Mar 7, 2024 · 1 comment

Comments

@mwargan
Copy link

mwargan commented Mar 7, 2024

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

@mwargan
Copy link
Author

mwargan commented Mar 7, 2024

And related to the above, we should probably reconsider this rule:

[aria-busy="true"]:not(input, select, textarea, html) {
  white-space: nowrap;
}

Which causes overflow issues when we have an overflow condition (like in the original issue description) AND the button is in loading state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant