From afd9d29850f16997d8641ca1546b21bf91e650a0 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Sun, 23 Sep 2018 09:40:09 +0200 Subject: [PATCH] fix(chips): invalid ripple color for selected chips * In case a chip is selected and is solid colored, we need to make sure that the ripples have the proper color (similar to raised, flat and fab buttons) --- src/lib/chips/_chips-theme.scss | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/chips/_chips-theme.scss b/src/lib/chips/_chips-theme.scss index 0b971144028b..ef6a113d6e26 100644 --- a/src/lib/chips/_chips-theme.scss +++ b/src/lib/chips/_chips-theme.scss @@ -5,10 +5,6 @@ $mat-chip-remove-font-size: 18px; -@mixin mat-chips-theme-color($color) { - @include mat-chips-color(mat-color($color, default-contrast), mat-color($color)); -} - @mixin mat-chips-color($foreground, $background) { background-color: $background; color: $foreground; @@ -23,6 +19,14 @@ $mat-chip-remove-font-size: 18px; } } +@mixin mat-chips-theme-color($palette) { + @include mat-chips-color(mat-color($palette, default-contrast), mat-color($palette)); + + .mat-ripple-element { + background: mat-color($palette, default-contrast, 0.1); + } +} + @mixin mat-chips-theme($theme) { $is-dark-theme: map-get($theme, is-dark); $primary: map-get($theme, primary);