Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(tabs): not selected tab text color as spec
Browse files Browse the repository at this point in the history
- In da48b6c the color changed from 100 to A100, after checking the spec, the color should be:
> Unfocused tab color: #fff 70%
- made the tabs mixin use parameters and simplified usage

Closes #7920
  • Loading branch information
EladBezalel authored and ThomasBurleson committed Apr 8, 2016
1 parent e821ae3 commit ccfef92
Showing 1 changed file with 22 additions and 56 deletions.
78 changes: 22 additions & 56 deletions src/components/tabs/tabs-theme.scss
Original file line number Diff line number Diff line change
@@ -1,68 +1,22 @@
@mixin md-tab-primary {
@mixin md-tab-theme($theme) {
> md-tabs-wrapper {
background-color: '{{primary-color}}';
background-color: '{{#{$theme}-color}}';
> md-tabs-canvas {
> md-pagination-wrapper {
> md-tab-item:not([disabled]) {
color: '{{primary-100}}';
&.md-active, &.md-focused {
&, md-icon {
color: '{{primary-contrast}}';
color: '{{#{$theme}-contrast}}';
}
}
&.md-focused {
background: '{{primary-contrast-0.1}}';
background: '{{#{$theme}-contrast-0.1}}';
}
}
}
}
}
}
@mixin md-tab-warn {
> md-tabs-wrapper {
background-color: '{{warn-color}}';
> md-tabs-canvas {
> md-pagination-wrapper {
> md-tab-item:not([disabled]) {
color: '{{warn-100}}';
&.md-active, &.md-focused {
&, md-icon {
color: '{{warn-contrast}}';
}
}
&.md-focused {
background: '{{warn-contrast-0.1}}';
}
}
}
}
}
}
@mixin md-tab-accent {
> md-tabs-wrapper {
background-color: '{{accent-color}}';
> md-tabs-canvas {
> md-pagination-wrapper {
> md-tab-item:not([disabled]) {
color: '{{accent-A100}}';
&.md-active, &.md-focused {
&, md-icon {
color: '{{accent-contrast}}';
}
}
&.md-focused {
background: '{{accent-contrast-0.1}}';
}
}
> md-ink-bar {
color: '{{primary-600-1}}';
background: '{{primary-600-1}}';
}
}
}
}

}
md-tabs.md-THEME_NAME-theme {
md-tabs-wrapper {
background-color: transparent;
Expand Down Expand Up @@ -97,25 +51,37 @@ md-tabs.md-THEME_NAME-theme {
}
}

&.md-accent, &.md-primary, &.md-warn{
> md-tabs-wrapper {
> md-tabs-canvas {
> md-pagination-wrapper {
> md-tab-item:not([disabled]) {
color: rgba(255, 255, 255, 0.7);
}
}
}
}
}

&.md-accent {
@include md-tab-accent();
@include md-tab-theme('accent');
}

&.md-primary {
@include md-tab-primary();
@include md-tab-theme('primary');
}

&.md-warn {
@include md-tab-warn();
@include md-tab-theme('warn');
}
}

md-toolbar > md-tabs.md-THEME_NAME-theme {
@include md-tab-primary();
@include md-tab-theme('primary');
}
md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme {
@include md-tab-accent();
@include md-tab-theme('accent');
}
md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme {
@include md-tab-warn();
@include md-tab-theme('warn');
}

0 comments on commit ccfef92

Please sign in to comment.