From baf6e32b67d26d430702414b68ff173b1afcb885 Mon Sep 17 00:00:00 2001 From: Sergey Koshechkin Date: Thu, 7 Nov 2019 15:31:15 +0300 Subject: [PATCH] feat(tooltip): add theming flexibility --- src/material/core/theming/_palette.scss | 2 ++ src/material/tooltip/_tooltip-theme.scss | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/material/core/theming/_palette.scss b/src/material/core/theming/_palette.scss index dd6ccfc5d643..c1e0b5cd2dfa 100644 --- a/src/material/core/theming/_palette.scss +++ b/src/material/core/theming/_palette.scss @@ -686,6 +686,7 @@ $mat-light-theme-background: ( disabled-button-toggle: map_get($mat-grey, 200), unselected-chip: map_get($mat-grey, 300), disabled-list-option: map_get($mat-grey, 200), + tooltip: map_get($mat-grey, 700), ); // Background palette for dark themes. @@ -704,6 +705,7 @@ $mat-dark-theme-background: ( disabled-button-toggle: black, unselected-chip: map_get($mat-grey, 700), disabled-list-option: black, + tooltip: map_get($mat-grey, 700), ); // Foreground palette for light themes. diff --git a/src/material/tooltip/_tooltip-theme.scss b/src/material/tooltip/_tooltip-theme.scss index 544a239eb3e3..94a830d52c44 100644 --- a/src/material/tooltip/_tooltip-theme.scss +++ b/src/material/tooltip/_tooltip-theme.scss @@ -12,8 +12,10 @@ $mat-tooltip-handset-vertical-padding: ($mat-tooltip-handset-target-height - $mat-tooltip-handset-font-size) / 2; @mixin mat-tooltip-theme($theme) { + $background: map-get($theme, background); + .mat-tooltip { - background: mat-color($mat-grey, 700, 0.9); + background: mat-color($background, tooltip, 0.9); } }