-
Notifications
You must be signed in to change notification settings - Fork 219
style(tabs): added sp-tabs-overflow mod tokens #5386
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
Conversation
🦋 Changeset detectedLatest commit: 5e577c6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 84 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Branch previewReview the following VRT differencesWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
If the changes are expected, update the |
Tachometer resultsChrometabs permalinkbasic-test
Firefoxtabs permalinkbasic-test
|
--sp-tabs-overflow-next-button-right: var( | ||
--mod-sp-tabs-overflow-next-button-right, | ||
calc(-1 * var(--spectrum-component-edge-to-text-100)) | ||
); | ||
--sp-tabs-overflow-previous-button-left: calc( | ||
-1 * var(--spectrum-component-edge-to-text-100) | ||
--sp-tabs-overflow-previous-button-left: var( | ||
--mod-sp-tabs-overflow-previous-button-left, | ||
calc(-1 * var(--spectrum-component-edge-to-text-100)) | ||
); | ||
--sp-tabs-overflow-button-height: calc( | ||
var(--spectrum-tab-item-height-medium) - | ||
var(--spectrum-border-width-200) | ||
); | ||
--sp-tabs-overflow-button-size: var(--spectrum-tab-item-height-medium); | ||
--sp-tabs-overflow-icon-color: var(--spectrum-gray-800); | ||
--sp-tabs-overflow-shadow-color: var(--spectrum-gray-100); | ||
--sp-tabs-overflow-shadow-color: var( | ||
--mod-sp-tabs-overflow-shadow-color, | ||
var(--spectrum-gray-100) | ||
); |
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 is a temporary fix and is against the mod inheritance property contract. Please reach out to the channel for better support from the spectrum-css team.
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 component is not in spectrum-css as far as I'm aware. Shouldn't we add these --mod tokens here?
We are going to close this after a discussion in slack. The horizon team is developing their own style of tabs so this is no longer needed. |
Description
This PR adds some --mod tokens to the sp-tabs-overflow component's styles to allow further customization.
Added --mod tokens to allow customization of:
--mod-sp-tabs-overflow-next-button-right
)--mod-sp-tabs-overflow-previous-button-left
)--mod-sp-tabs-overflow-shadow-color
)Related issue(s)
Motivation and context
With the current styling, this can have an undesired look when the sp-tabs-overflow element does not ocupy the whole width of the parent.

The change will allow for looks similar to this one (see that the gradient fades into the background)

Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.