Skip to content

Commit

Permalink
fix(tabs): centered and adjusted vertical placement of css-only tab i…
Browse files Browse the repository at this point in the history
…ndicator (#2141)
  • Loading branch information
Matty Goo authored Feb 1, 2018
1 parent 0979105 commit e01bb84
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/mdc-tabs/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@include mdc-theme-prop(background-color, text-primary-on-light);

position: absolute;
left: 0;
bottom: 0;
height: 2px;
visibility: hidden;
}
19 changes: 8 additions & 11 deletions packages/mdc-tabs/tab-bar/mdc-tab-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
@import "./mixins";
@import "../mixins";

.mdc-tab-bar__indicator {
@include mdc-tab-bar-indicator-mixin_;
bottom: 0;
}

// postcss-bem-linter: define tab-bar

@at-root {
Expand All @@ -37,14 +32,16 @@
height: 48px;
margin: 0 auto;
text-transform: uppercase;
}

&__indicator {
width: 100%;
.mdc-tab-bar__indicator {
@include mdc-tab-bar-indicator-mixin_;

transform-origin: left top;
transition: mdc-animation-enter(transform, 240ms);
will-change: transform;
}
width: 100%;
left: 0;
transform-origin: left top;
transition: mdc-animation-enter(transform, 240ms);
will-change: transform;
}

.mdc-tab-bar--icons-with-text {
Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-tabs/tab/mdc-tab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ $mdc-tab-with-icon-and-text-height: 72px;
.mdc-tab__indicator {
@include mdc-tab-bar-indicator-mixin_;

bottom: 2px;
left: 2px;
width: calc(100% - 4px);
}

Expand Down

0 comments on commit e01bb84

Please sign in to comment.