Skip to content

Commit

Permalink
fix(tabs): update tab styles (#5482)
Browse files Browse the repository at this point in the history
* fix(tabs): update tab styles

* fix(tabs): use flex to align text to baseline

* fix(tabs): reduce padding to account for line-height

* fix(tabs): revert padding change

* fix(tabs): change border color to interactive-04

Co-authored-by: Josh Black <[email protected]>
  • Loading branch information
tw15egan and joshblack authored Mar 3, 2020
1 parent 7c87347 commit 1c8c9bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
15 changes: 6 additions & 9 deletions packages/components/src/components/tabs/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,12 @@

@include carbon--breakpoint(md) {
display: flex;
.#{$prefix}--tabs__nav-link {
color: $text-01;
@include type-style('productive-heading-01');
border-bottom: 3px solid $interactive-01;
}

.#{$prefix}--tabs__nav-link,
.#{$prefix}--tabs__nav-link:focus,
.#{$prefix}--tabs__nav-link:active {
@include type-style('productive-heading-01');
color: $text-01;
border-bottom: 2px solid $interactive-01;
border-bottom: 2px solid $interactive-04;
}
}
}
Expand Down Expand Up @@ -296,7 +292,8 @@
//-----------------------------
a.#{$prefix}--tabs__nav-link {
@include focus-outline('reset');
display: inline-block;
display: inline-flex;
align-items: flex-end;
color: $text-02;
text-decoration: none;
font-weight: 400;
Expand All @@ -314,10 +311,10 @@

&:focus,
&:active {
@include focus-outline('outline');
width: 100%;
margin: 0;
padding-left: 16px;
@include focus-outline('outline');
}

@include carbon--breakpoint(md) {
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/globals/scss/_theme-tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,12 @@ $structured-list-text-transform: none !default;
/// @type Value
/// @access public
/// @group tabs
$tab-underline-color: 3px solid $ui-03 !default;
$tab-underline-color: 2px solid $ui-03 !default;

/// @type Value
/// @access public
/// @group tabs
$tab-underline-color-hover: 3px solid $ui-04 !default;
$tab-underline-color-hover: 2px solid $ui-04 !default;

/// @type Color
/// @access public
Expand All @@ -352,7 +352,7 @@ $tab-text-disabled: $disabled-02 !default;
/// @type Value
/// @access public
/// @group tabs
$tab-underline-disabled: 3px solid $disabled-01 !default;
$tab-underline-disabled: 2px solid $disabled-01 !default;

// Skeleton Loading

Expand Down

0 comments on commit 1c8c9bf

Please sign in to comment.