File tree Expand file tree Collapse file tree 4 files changed +10
-13
lines changed Expand file tree Collapse file tree 4 files changed +10
-13
lines changed Original file line number Diff line number Diff line change 1
1
@use ' sass:map' ;
2
- @use ' ./theming/inspection' ;
3
2
@use ' ./style/elevation' ;
4
3
@use ' ../core/tokens/m2-utils' ;
5
4
19
18
);
20
19
21
20
@for $zValue from 0 through 24 {
22
- $elevation-color : inspection .get-theme-color ($theme , foreground , elevation );
23
- $shadow : elevation .get-box-shadow ($zValue ,
24
- if ($elevation-color == null , elevation .$color , $elevation-color ));
21
+ $shadow : elevation .get-box-shadow ($zValue , map .get ($system , shadow ));
25
22
$tokens : map .set ($tokens , ' app-elevation-shadow-level-#{$zValue } ' , $shadow );
26
23
}
27
24
Original file line number Diff line number Diff line change 135
135
hover- state- layer- opacity: 0.04 ,
136
136
focus- state- layer- opacity: 0.12 ,
137
137
pressed- state- layer- opacity: 0.12 ,
138
+ shadow : black ,
138
139
primary: map .get ($primary , default ),
139
140
on- primary: map .get ($primary , default-contrast ),
140
141
secondary: map .get ($accent , default ),
167
168
hover- state- layer- opacity: 0.04 ,
168
169
focus- state- layer- opacity: 0.12 ,
169
170
pressed- state- layer- opacity: 0.12 ,
171
+ shadow : black ,
170
172
primary: map .get ($primary , default ),
171
173
on- primary: map .get ($primary , default-contrast ),
172
174
secondary: map .get ($accent , default ),
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ sass_library(
57
57
deps = [
58
58
":elevation" ,
59
59
"//src/material/core/theming:_inspection" ,
60
+ "//src/material/core/tokens:m2_utils" ,
60
61
],
61
62
)
62
63
Original file line number Diff line number Diff line change 1
1
@use ' ./elevation' ;
2
- @use ' ../theming/inspection' ;
2
+ @use ' ../tokens/m2-utils' ;
3
+ @use ' sass:map' ;
3
4
4
5
@mixin private-theme-elevation ($zValue , $theme ) {
5
- $elevation-color : inspection .get-theme-color ($theme , foreground , elevation );
6
- $elevation-color-or-default : if ($elevation-color == null , elevation .$color , $elevation-color );
7
-
8
- @include elevation .elevation ($zValue , $elevation-color-or-default );
6
+ $system : m2-utils .get-system ($theme );
7
+ @include elevation .elevation ($zValue , map .get ($system , shadow ));
9
8
}
10
9
11
10
@mixin private-theme-overridable-elevation ($zValue , $theme ) {
12
- $elevation-color : inspection .get-theme-color ($theme , foreground , elevation );
13
- $elevation-color-or-default : if ($elevation-color == null , elevation .$color , $elevation-color );
14
-
15
- @include elevation .overridable-elevation ($zValue , $elevation-color-or-default );
11
+ $system : m2-utils .get-system ($theme );
12
+ @include elevation .overridable-elevation ($zValue , map .get ($system , shadow ));
16
13
}
17
14
18
15
// If the mat-animation-noop class is present on the components root element,
You can’t perform that action at this time.
0 commit comments