|
23 | 23 | } |
24 | 24 | } |
25 | 25 |
|
26 | | -@mixin _mat-button-ripple-color($theme) { |
| 26 | +@mixin _mat-button-ripple-color($theme, $hue: default) { |
27 | 27 | $primary: map-get($theme, primary); |
28 | 28 | $accent: map-get($theme, accent); |
29 | 29 | $warn: map-get($theme, warn); |
30 | 30 |
|
31 | 31 | &.mat-primary .mat-ripple-element { |
32 | | - background-color: mat-color($primary, 0.26); |
| 32 | + background-color: mat-color($primary, $hue, 0.26); |
33 | 33 | } |
34 | 34 |
|
35 | 35 | &.mat-accent .mat-ripple-element { |
36 | | - background-color: mat-color($accent, 0.26); |
| 36 | + background-color: mat-color($accent, $hue, 0.26); |
37 | 37 | } |
38 | 38 |
|
39 | 39 | &.mat-warn .mat-ripple-element { |
40 | | - background-color: mat-color($warn, 0.26); |
| 40 | + background-color: mat-color($warn, $hue, 0.26); |
41 | 41 | } |
42 | 42 | } |
43 | 43 |
|
|
97 | 97 |
|
98 | 98 | @include _mat-button-theme-color($theme, 'color', default-contrast); |
99 | 99 | @include _mat-button-theme-color($theme, 'background-color'); |
| 100 | + @include _mat-button-ripple-color($theme, default-contrast); |
100 | 101 | } |
101 | 102 |
|
| 103 | + // TODO(devversion): The color class accent should be just set from TS code. No need for this. |
102 | 104 | .mat-fab, .mat-mini-fab { |
103 | 105 | background-color: mat-color($accent); |
104 | 106 | color: mat-color($accent, default-contrast); |
| 107 | + |
| 108 | + // Button fab elements are using the accent palette by default. The color classes won't |
| 109 | + // be set on the element. To have a proper ripple color for those, we set the ripple color. |
| 110 | + .mat-ripple-element { |
| 111 | + background-color: mat-color($accent, default-contrast, 0.26); |
| 112 | + } |
105 | 113 | } |
106 | 114 | } |
107 | 115 |
|
|
0 commit comments