-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Tabs
obscure unintentional horizontal overflow
#66347
Comments
@DaniGuardiola, I'm pinging you since to best of my knowledge you’ve headed up the recent In case you can reproduce and can devote some effort for a fix, this diff might be worth a try as it fixed it for me but has not been tested enough to know if it doesn’t cause other issues. diff --git a/packages/components/src/tabs/styles.ts b/packages/components/src/tabs/styles.ts
index 717316227d..684bd19add 100644
--- a/packages/components/src/tabs/styles.ts
+++ b/packages/components/src/tabs/styles.ts
@@ -21,7 +21,7 @@ export const StyledTabList = styled( Ariakit.TabList )`
}
:where( [aria-orientation='horizontal'] ) {
- width: fit-content;
+ flex: 1;
}
--direction-factor: 1;
@@ -156,7 +156,7 @@ export const Tab = styled( Ariakit.Tab )`
border: none;
box-shadow: none;
- flex: 1 0 auto;
+ flex: 0 0 auto;
white-space: nowrap;
display: flex;
align-items: center;
|
cc @ciampo |
@stokesman I'll look into it, thank you for reporting! Please direct all |
As for the bug:
Kapture.2024-10-24.at.14.49.43.mp4Opened a PR with a potential fix: #66426 |
Thank you @stokesman and @ciampo 🚀 |
Description
I happened to have a custom post type whose singular name surfaces an issue with horizontal overflow in the
Tabs
component.tabs-obscure-overflow.mp4
The particular text string is not important and probably dependent on OS/font settings for it to surface the issue. In my case it was hard to find other strings that reproduce this and maybe there’s a better way to surface this.
This isn’t reproducable in 6.6.1 but I haven’t tested 6.6.2 or others.
Step-by-step reproduction instructions
This probably can be hard to reproduce the best shot will be on macOS since that’s where I found it.
With the following code in an active plugin; appending it in
gutenberg.php
works well.Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: