Skip to content

Commit

Permalink
fix(material-experimental/mdc-tooltip): make background color opaque (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
wagnermaciel committed Jul 13, 2021
1 parent 6a6712d commit e134598
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/material-experimental/mdc-tooltip/_tooltip-theme.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
@use 'sass:map';
@use '@material/tooltip/tooltip';
@use '@material/tooltip/tooltip-theme';
@use '../mdc-helpers/mdc-helpers';
@use '../../material/core/theming/theming';
@use '../../material/core/theming/palette';
@use '../../material/core/typography/typography';

@mixin color($config-or-theme) {
$config: theming.get-color-config($config-or-theme);
@include mdc-helpers.mat-using-mdc-theme($config) {
@include tooltip.core-styles($query: mdc-helpers.$mat-theme-styles-query);
// We are defining our own tooltip background color because of concerns
// surrounding the 0.6 background color opacity of the MDC tooltip styles.
@include tooltip-theme.fill-color(
map.get(palette.$light-theme-background-palette, tooltip)
);
}
}

Expand Down

0 comments on commit e134598

Please sign in to comment.