1
- @use ' sass:map' ;
2
1
@use ' sass:meta' ;
3
- @use ' @material/ripple/ripple-theme' as mdc-ripple-theme ;
4
2
@use ' ../../token-utils' ;
5
3
@use ' ../../../theming/theming' ;
6
4
@use ' ../../../theming/inspection' ;
@@ -19,10 +17,6 @@ $prefix: (mat, fab-small);
19
17
// Tokens that can be configured through Angular Material's color theming API.
20
18
@function get-color-tokens ($theme ) {
21
19
$is-dark : inspection .get-theme-type ($theme ) == dark ;
22
- $ripple-opacities : if ($is-dark ,
23
- mdc-ripple-theme .$light-ink-opacities ,
24
- mdc-ripple-theme .$dark-ink-opacities
25
- );
26
20
27
21
@return (
28
22
// Color of icons and text projected into a FAB.
@@ -38,13 +32,13 @@ $prefix: (mat, fab-small);
38
32
ripple- color: inspection .get-theme-color ($theme , foreground , base , 0.1 ),
39
33
40
34
// Opacity of the ripple when the button is hovered.
41
- hover- state- layer- opacity: map . get ( $ripple-opacities , hover ),
35
+ hover- state- layer- opacity: if ( $is-dark , 0.08 , 0.04 ),
42
36
43
37
// Opacity of the ripple when the button is focused.
44
- focus- state- layer- opacity: map . get ( $ripple-opacities , focus ),
38
+ focus- state- layer- opacity: if ( $is-dark , 0.24 , 0.12 ),
45
39
46
40
// Opacity of the ripple when the button is pressed.
47
- pressed- state- layer- opacity: map . get ( $ripple-opacities , press ),
41
+ pressed- state- layer- opacity: if ( $is-dark , 0.24 , 0.12 ),
48
42
49
43
// MDC doesn't have tokens for disabled FABs so we need to implemented them ourselves.
50
44
// Background color of the container when the FAB is disabled.
0 commit comments