-
Notifications
You must be signed in to change notification settings - Fork 34
feat(#3095): Tabs v2 styling update #3101
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
base: v2-2998-coded-component-updates
Are you sure you want to change the base?
Conversation
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.
Looks good! You just need to add fallback values for those tokens that don't have v1 values.
gap: var(--goa-tabs-gap-small-screen); | ||
padding-bottom: var(--goa-space-m); | ||
margin-bottom: 2rem; | ||
padding-bottom: var(--goa-tabs-padding-bottom-mobile); |
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.
This variable is undefined
with v1 tokens. Don't forget to add the space-m
fallback.
:global([role="tab"][aria-selected="true"]) { | ||
font: var(--goa-tab-typography-selected); | ||
color: var(--goa-tab-color-text-selected); |
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.
This variable is undefined
with v1 tokens.
border: none; | ||
font: var(--goa-tab-typography); | ||
color: var(--goa-tab-text-color); | ||
color: var(--goa-tab-color-text-not-selected); |
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.
This variable is undefined
with v1 tokens.
:global([role="tab"]:hover:not([aria-selected="true"])) { | ||
border-bottom: var(--goa-tab-border-hover); | ||
color: var(--goa-tab-color-text-hover); |
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.
This variable is undefined
with v1 tokens.
border-left: var(--goa-tab-border-hover); | ||
border-bottom: none; | ||
border-left: var(--goa-tab-border-hover); | ||
background: var(--goa-tab-color-bg-hover-small-screen); |
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.
This variable is undefined
with v1 tokens.
Summary
Updates the Tabs component to support V2 design system styling while
maintaining full backward compatibility with V1.
Changes
New Props
version
("1" | "2"
, default"1"
): Controls V1 vs V2 stylingV2 Styling Updates
Typography & Colors
(
color.interactive.default
)color.greyscale.600
)color.text.default
)Spacing
8px 4px 9px 4px
(adjusted for 3px indicator + visualspacing)
4px 12px 4px 15px
(accommodates left-side indicator)Active Indicators
color.interactive.default
)color.greyscale.300
) with rounded cornersState Styling
rounded corners
background (
color.greyscale.50
)(
color.greyscale.150
)Other Improvements
color.info.light
)Technical Implementation
Token + CSS Approach
::after
) required for rounded corner indicatorsV2 CSS Scoping
.v2
class selectorTesting
All changes tested in web components playground with:
Related