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

Commit ccfef92

Browse files
EladBezalelThomasBurleson
authored andcommitted
fix(tabs): not selected tab text color as spec
- 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
1 parent e821ae3 commit ccfef92

File tree

1 file changed

+22
-56
lines changed

1 file changed

+22
-56
lines changed

src/components/tabs/tabs-theme.scss

Lines changed: 22 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,22 @@
1-
@mixin md-tab-primary {
1+
@mixin md-tab-theme($theme) {
22
> md-tabs-wrapper {
3-
background-color: '{{primary-color}}';
3+
background-color: '{{#{$theme}-color}}';
44
> md-tabs-canvas {
55
> md-pagination-wrapper {
66
> md-tab-item:not([disabled]) {
7-
color: '{{primary-100}}';
87
&.md-active, &.md-focused {
98
&, md-icon {
10-
color: '{{primary-contrast}}';
9+
color: '{{#{$theme}-contrast}}';
1110
}
1211
}
1312
&.md-focused {
14-
background: '{{primary-contrast-0.1}}';
13+
background: '{{#{$theme}-contrast-0.1}}';
1514
}
1615
}
1716
}
1817
}
1918
}
2019
}
21-
@mixin md-tab-warn {
22-
> md-tabs-wrapper {
23-
background-color: '{{warn-color}}';
24-
> md-tabs-canvas {
25-
> md-pagination-wrapper {
26-
> md-tab-item:not([disabled]) {
27-
color: '{{warn-100}}';
28-
&.md-active, &.md-focused {
29-
&, md-icon {
30-
color: '{{warn-contrast}}';
31-
}
32-
}
33-
&.md-focused {
34-
background: '{{warn-contrast-0.1}}';
35-
}
36-
}
37-
}
38-
}
39-
}
40-
}
41-
@mixin md-tab-accent {
42-
> md-tabs-wrapper {
43-
background-color: '{{accent-color}}';
44-
> md-tabs-canvas {
45-
> md-pagination-wrapper {
46-
> md-tab-item:not([disabled]) {
47-
color: '{{accent-A100}}';
48-
&.md-active, &.md-focused {
49-
&, md-icon {
50-
color: '{{accent-contrast}}';
51-
}
52-
}
53-
&.md-focused {
54-
background: '{{accent-contrast-0.1}}';
55-
}
56-
}
57-
> md-ink-bar {
58-
color: '{{primary-600-1}}';
59-
background: '{{primary-600-1}}';
60-
}
61-
}
62-
}
63-
}
64-
65-
}
6620
md-tabs.md-THEME_NAME-theme {
6721
md-tabs-wrapper {
6822
background-color: transparent;
@@ -97,25 +51,37 @@ md-tabs.md-THEME_NAME-theme {
9751
}
9852
}
9953

54+
&.md-accent, &.md-primary, &.md-warn{
55+
> md-tabs-wrapper {
56+
> md-tabs-canvas {
57+
> md-pagination-wrapper {
58+
> md-tab-item:not([disabled]) {
59+
color: rgba(255, 255, 255, 0.7);
60+
}
61+
}
62+
}
63+
}
64+
}
65+
10066
&.md-accent {
101-
@include md-tab-accent();
67+
@include md-tab-theme('accent');
10268
}
10369

10470
&.md-primary {
105-
@include md-tab-primary();
71+
@include md-tab-theme('primary');
10672
}
10773

10874
&.md-warn {
109-
@include md-tab-warn();
75+
@include md-tab-theme('warn');
11076
}
11177
}
11278

11379
md-toolbar > md-tabs.md-THEME_NAME-theme {
114-
@include md-tab-primary();
80+
@include md-tab-theme('primary');
11581
}
11682
md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme {
117-
@include md-tab-accent();
83+
@include md-tab-theme('accent');
11884
}
11985
md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme {
120-
@include md-tab-warn();
86+
@include md-tab-theme('warn');
12187
}

0 commit comments

Comments
 (0)