Skip to content

Commit 924494d

Browse files
FrankiePojelbourn
authored andcommitted
fix(tooltip): theming can affect the tooltip color (#17643)
1 parent f96e820 commit 924494d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/material/core/theming/_palette.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,7 @@ $mat-light-theme-background: (
686686
disabled-button-toggle: map_get($mat-grey, 200),
687687
unselected-chip: map_get($mat-grey, 300),
688688
disabled-list-option: map_get($mat-grey, 200),
689+
tooltip: map_get($mat-grey, 700),
689690
);
690691

691692
// Background palette for dark themes.
@@ -704,6 +705,7 @@ $mat-dark-theme-background: (
704705
disabled-button-toggle: black,
705706
unselected-chip: map_get($mat-grey, 700),
706707
disabled-list-option: black,
708+
tooltip: map_get($mat-grey, 700),
707709
);
708710

709711
// Foreground palette for light themes.

src/material/tooltip/_tooltip-theme.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ $mat-tooltip-handset-vertical-padding:
1212
($mat-tooltip-handset-target-height - $mat-tooltip-handset-font-size) / 2;
1313

1414
@mixin mat-tooltip-theme($theme) {
15+
$background: map-get($theme, background);
16+
1517
.mat-tooltip {
16-
background: mat-color($mat-grey, 700, 0.9);
18+
background: mat-color($background, tooltip, 0.9);
1719
}
1820
}
1921

0 commit comments

Comments
 (0)