-
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: update styling to more closely match previous implementation #57275
Conversation
Pinging @WordPress/gutenberg-design folks specifically about the text aligning — should we align text in the tab buttons to the left by default (like we do on the legacy |
Throwing out one additional wrinkle I've just come across: If we decide we want center aligned text on tabs, we should consider how that would look on a vertically oriented tablist, like the one we currently render in the Editor Preferences |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Replaces #57121
What?
Updates the styling on
Tabs
to match the legacyTabPanel
componentWhy?
To avoid being overly opinionated,
Tabs
is set up to render a vanillabutton
element, allowing consumers to opt for aButton
component if they wish, via therender
prop.This caused a few styles to be lost, such as the hover color and the alignment of the text on tabs when the tab is wider than its contents.
How?
Add the hover color and necessary layout attributes directly to the default
tab
element.Testing Instructions
flex-grow:1
style to each of theTabs.Tab
components in the Default story (making them wide enough for text alignment to be noticeable)