Skip to content

Commit 057eee1

Browse files
devversionVivian Hu
authored and
Vivian Hu
committed
fix(chips): invalid ripple color for selected chips (#13271)
* 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)
1 parent 905f0b4 commit 057eee1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/lib/chips/_chips-theme.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
$mat-chip-remove-font-size: 18px;
77

8-
@mixin mat-chips-theme-color($color) {
9-
@include mat-chips-color(mat-color($color, default-contrast), mat-color($color));
10-
}
11-
128
@mixin mat-chips-color($foreground, $background) {
139
background-color: $background;
1410
color: $foreground;
@@ -23,6 +19,14 @@ $mat-chip-remove-font-size: 18px;
2319
}
2420
}
2521

22+
@mixin mat-chips-theme-color($palette) {
23+
@include mat-chips-color(mat-color($palette, default-contrast), mat-color($palette));
24+
25+
.mat-ripple-element {
26+
background: mat-color($palette, default-contrast, 0.1);
27+
}
28+
}
29+
2630
@mixin mat-chips-theme($theme) {
2731
$is-dark-theme: map-get($theme, is-dark);
2832
$primary: map-get($theme, primary);

0 commit comments

Comments
 (0)