Skip to content

Commit 951f37e

Browse files
andrewseguinAndrew Seguin
and
Andrew Seguin
authored
fix(material/tabs): update tokens to system colors (#31287)
Co-authored-by: Andrew Seguin <andrewseguin@google.com>
1 parent 28f2763 commit 951f37e

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/material/tabs/_m2-tabs.scss

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,16 @@
2929
@function get-color-tokens($theme, $color-variant, $exclude: ()) {
3030
$system: m2-utils.get-system($theme);
3131
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
32-
$is-dark: inspection.get-theme-type($theme) == dark;
33-
$inactive-label-text-color: inspection.get-theme-color($theme, foreground, base, 0.6);
3432

3533
$tokens: (
36-
tab-disabled-ripple-color: inspection.get-theme-color($theme, foreground, disabled),
34+
tab-disabled-ripple-color: map.get($system, on-surface-variant),
3735
tab-pagination-icon-color: inspection.get-theme-color($theme, system, on-surface),
38-
39-
// Note: MDC has equivalents of these tokens, but they lead to much higher selector specificity.
40-
tab-inactive-label-text-color: $inactive-label-text-color,
36+
tab-inactive-label-text-color: map.get($system, on-surface-variant),
4137
tab-active-label-text-color: map.get($system, primary),
42-
43-
// Tokens needed to implement the gmat styles. Externally they don't change.
4438
tab-active-ripple-color: map.get($system, primary),
4539
tab-inactive-ripple-color: map.get($system, primary),
46-
tab-inactive-focus-label-text-color: $inactive-label-text-color,
47-
tab-inactive-hover-label-text-color: $inactive-label-text-color,
40+
tab-inactive-focus-label-text-color: map.get($system, on-surface-variant),
41+
tab-inactive-hover-label-text-color: map.get($system, on-surface-variant),
4842
tab-active-focus-label-text-color: map.get($system, primary),
4943
tab-active-hover-label-text-color: map.get($system, primary),
5044
tab-active-focus-indicator-color: map.get($system, primary),

0 commit comments

Comments
 (0)