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

feat(tabs): take out fade from scroll button #16522

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,15 @@
"code",
"doc"
]
},
{
"login": "divya-281",
"name": "Divya G",
"avatar_url": "https://avatars.githubusercontent.com/u/72991264?v=4",
"profile": "https://github.com/divya-281",
"contributions": [
"code"
]
}
],
"commitConvention": "none"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<tr>
<td align="center"><a href="https://github.com/NabeelAyubee"><img src="https://avatars.githubusercontent.com/u/64087875?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Md Nabeel Ayubee</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=NabeelAyubee" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/pamrulla"><img src="https://avatars.githubusercontent.com/u/4942741?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Patan Amrulla Khan</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=pamrulla" title="Code">💻</a> <a href="https://github.com/carbon-design-system/carbon/commits?author=pamrulla" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/divya-281"><img src="https://avatars.githubusercontent.com/u/72991264?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Divya G</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=divya-281" title="Code">💻</a></td>
</tr>
</table>

Expand Down
46 changes: 20 additions & 26 deletions packages/styles/scss/components/tabs/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,49 +163,43 @@
.#{$prefix}--tab--overflow-nav-button--next::before {
position: absolute;
z-index: 1;
background: linear-gradient(
to right,
rgba(255, 255, 255, 0),
$background
);
block-size: 100%;
content: '';
inline-size: $spacing-03;
inset-inline-start: -$spacing-03;
}

&.#{$prefix}--tabs--contained
&:not(.#{$prefix}--tabs--contained) {
.#{$prefix}--tab--overflow-nav-button--next::before {
background-image: linear-gradient(
to right,
rgba(255, 255, 255, 0),
$layer-accent
);
background: linear-gradient(
to right,
rgba(255, 255, 255, 0),
$background
);
}
.#{$prefix}--tab--overflow-nav-button--previous::before {
background: linear-gradient(
to left,
rgba(255, 255, 255, 0),
$background
);
}
}

.#{$prefix}--tab--overflow-nav-button--previous {
position: absolute;
z-index: 1;
inset-block: 0 0;
inset-inline-start: 0;
}

.#{$prefix}--tab--overflow-nav-button--previous::before {
position: absolute;
z-index: 1;
background: $background;
block-size: 100%;
content: '';
inline-size: $spacing-08;
inset-inline-end: 0;
}

&.#{$prefix}--tabs--contained
.#{$prefix}--tab--overflow-nav-button--previous::before {
background: linear-gradient(
to left,
rgba(255, 255, 255, 0),
$layer-accent
);
inline-size: $spacing-03;
inset-inline-end: -$spacing-03;
}

.#{$prefix}--tabs--light .#{$prefix}--tabs__overflow-indicator--left {
Expand Down Expand Up @@ -624,13 +618,13 @@

.#{$prefix}--tabs__nav-item--disabled {
background-color: transparent;
border-block-end: $tab-underline-disabled;
border-block-end: 2px solid $border-subtle;
color: $tab-text-disabled;
outline: none;
}

.#{$prefix}--tabs__nav-item--disabled:hover {
border-block-end: $tab-underline-disabled;
border-block-end: 2px solid $border-subtle;
color: $tab-text-disabled;
cursor: not-allowed;
}
Expand All @@ -652,7 +646,7 @@

.#{$prefix}--tabs__nav-item--disabled:focus,
.#{$prefix}--tabs__nav-item--disabled:active {
border-block-end: $tab-underline-disabled;
border-block-end: 2px solid $border-subtle;
outline: none;
pointer-events: none;
}
Expand Down
Loading