From 392b489e2182bf15f4a1744ee643753d7858fca6 Mon Sep 17 00:00:00 2001 From: emyarod Date: Fri, 30 Oct 2020 13:08:47 -0500 Subject: [PATCH] fix(Tabs): update scrollable container tabs selectors (#7184) Co-authored-by: Josh Black --- .../components/src/components/tabs/_tabs.scss | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/packages/components/src/components/tabs/_tabs.scss b/packages/components/src/components/tabs/_tabs.scss index 8038cfff0d2d..c99afbab156d 100644 --- a/packages/components/src/components/tabs/_tabs.scss +++ b/packages/components/src/components/tabs/_tabs.scss @@ -440,7 +440,7 @@ min-height: rem(40px); color: $text-01; - .#{$prefix}--tabs--scrollable--container { + &.#{$prefix}--tabs--scrollable--container { min-height: rem(48px); } @@ -493,12 +493,12 @@ background-image: linear-gradient(to right, transparent, $ui-01); } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs__overflow-indicator--left { background-image: linear-gradient(to left, transparent, $ui-03); } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs__overflow-indicator--right { background-image: linear-gradient(to right, transparent, $ui-03); } @@ -526,11 +526,12 @@ ); } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs__overflow-indicator--left { background-image: linear-gradient(to left, rgba($ui-03, 0), $ui-03); } - .#{$prefix}--tabs--scrollable--container + + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs__overflow-indicator--right { background-image: linear-gradient(to right, rgba($ui-03, 0), $ui-03); } @@ -555,7 +556,7 @@ display: none; } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tab--overflow-nav-button { width: $carbon--spacing-09; margin: 0; @@ -584,12 +585,12 @@ margin-left: rem(1px); } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item { background-color: $ui-03; } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item + .#{$prefix}--tabs--scrollable__nav-item { margin-left: 0; @@ -597,10 +598,10 @@ box-shadow: rem(-1px) 0 0 0 $ui-04; } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item + .#{$prefix}--tabs--scrollable__nav-item.#{$prefix}--tabs--scrollable__nav-item--selected, - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item.#{$prefix}--tabs--scrollable__nav-item--selected + .#{$prefix}--tabs--scrollable__nav-item { box-shadow: none; @@ -616,7 +617,7 @@ //----------------------------- // Item Hover //----------------------------- - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item:hover { background-color: $hover-selected-ui; } @@ -631,9 +632,9 @@ cursor: not-allowed; } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item.#{$prefix}--tabs--scrollable__nav-item--disabled, - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item.#{$prefix}--tabs--scrollable__nav-item--disabled:hover { background-color: $disabled-02; } @@ -657,9 +658,9 @@ border-bottom: 2px solid $interactive-04; } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item--selected, - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item--selected:hover { background-color: $ui-01; @@ -669,7 +670,7 @@ } } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item--selected .#{$prefix}--tabs--scrollable__nav-link { // height - vertical padding @@ -678,9 +679,9 @@ box-shadow: inset 0 2px 0 0 $interactive-04; } - .#{$prefix}--tabs--scrollable--light.#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--light.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item--selected, - .#{$prefix}--tabs--scrollable--light.#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--light.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item--selected:hover { background-color: $ui-background; } @@ -711,7 +712,7 @@ } } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-link { height: rem(48px); padding: $spacing-03 $spacing-05; @@ -729,7 +730,7 @@ border-bottom: $tab-underline-color-hover; } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item .#{$prefix}--tabs--scrollable__nav-link { border-bottom: none; @@ -781,7 +782,7 @@ border-bottom-color: $ui-03; } - .#{$prefix}--tabs--scrollable--container + &.#{$prefix}--tabs--scrollable--container .#{$prefix}--tabs--scrollable__nav-item--disabled .#{$prefix}--tabs--scrollable__nav-link { color: $disabled-03;