Skip to content

Commit e134598

Browse files
authored
fix(material-experimental/mdc-tooltip): make background color opaque (#23106)
* fix(material-experimental/mdc-tooltip): make background color opaque * due to a11y concerns surrounding the 0.6 background color opacity of the mdc-tooltip, we are switching to using our own custom background color instead of the one defined in the MDC styles. * fixup! fix(material-experimental/mdc-tooltip): make background color opaque * fixup! fix(material-experimental/mdc-tooltip): make background color opaque
1 parent 6a6712d commit e134598

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/material-experimental/mdc-tooltip/_tooltip-theme.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1+
@use 'sass:map';
12
@use '@material/tooltip/tooltip';
3+
@use '@material/tooltip/tooltip-theme';
24
@use '../mdc-helpers/mdc-helpers';
35
@use '../../material/core/theming/theming';
6+
@use '../../material/core/theming/palette';
47
@use '../../material/core/typography/typography';
58

69
@mixin color($config-or-theme) {
710
$config: theming.get-color-config($config-or-theme);
811
@include mdc-helpers.mat-using-mdc-theme($config) {
912
@include tooltip.core-styles($query: mdc-helpers.$mat-theme-styles-query);
13+
// We are defining our own tooltip background color because of concerns
14+
// surrounding the 0.6 background color opacity of the MDC tooltip styles.
15+
@include tooltip-theme.fill-color(
16+
map.get(palette.$light-theme-background-palette, tooltip)
17+
);
1018
}
1119
}
1220

0 commit comments

Comments
 (0)