File tree Expand file tree Collapse file tree 4 files changed +21
-24
lines changed Expand file tree Collapse file tree 4 files changed +21
-24
lines changed Original file line number Diff line number Diff line change @@ -78,3 +78,12 @@ $_component-prefix: null;
78
78
@include mdc-theme .property ($property , $value );
79
79
}
80
80
}
81
+
82
+ // Merges together a list of maps into a single map.
83
+ @function merge-all ($maps ... ) {
84
+ $result : ();
85
+ @each $map in $maps {
86
+ $result : map .merge ($result , $map );
87
+ }
88
+ @return $result ;
89
+ }
Original file line number Diff line number Diff line change @@ -69,14 +69,10 @@ $prefix: (mdc, elevated-card);
69
69
// Combines the tokens generated by the above functions into a single map with placeholder values.
70
70
// This is used to create token slots.
71
71
@function get-token-slots () {
72
- @return map .merge (
72
+ @return token-utils .merge-all (
73
73
get-unthemable-tokens (),
74
- map .merge (
75
- get-color-tokens (token-utils .$placeholder-color-config ),
76
- map .merge (
77
- get-typography-tokens (token-utils .$placeholder-typography-config ),
78
- get-density-tokens (token-utils .$placeholder-density-config )
79
- )
80
- )
74
+ get-color-tokens (token-utils .$placeholder-color-config ),
75
+ get-typography-tokens (token-utils .$placeholder-typography-config ),
76
+ get-density-tokens (token-utils .$placeholder-density-config )
81
77
);
82
78
}
Original file line number Diff line number Diff line change @@ -207,14 +207,10 @@ $prefix: (mdc, list);
207
207
// Combines the tokens generated by the above functions into a single map with placeholder values.
208
208
// This is used to create token slots.
209
209
@function get-token-slots () {
210
- @return map .merge (
210
+ @return token-utils .merge-all (
211
211
get-unthemable-tokens (),
212
- map .merge (
213
- get-color-tokens (token-utils .$placeholder-color-config ),
214
- map .merge (
215
- get-typography-tokens (token-utils .$placeholder-typography-config ),
216
- get-density-tokens (token-utils .$placeholder-density-config )
217
- )
218
- )
212
+ get-color-tokens (token-utils .$placeholder-color-config ),
213
+ get-typography-tokens (token-utils .$placeholder-typography-config ),
214
+ get-density-tokens (token-utils .$placeholder-density-config )
219
215
);
220
216
}
Original file line number Diff line number Diff line change @@ -78,14 +78,10 @@ $prefix: (mdc, outlined-card);
78
78
// Combines the tokens generated by the above functions into a single map with placeholder values.
79
79
// This is used to create token slots.
80
80
@function get-token-slots () {
81
- @return map .merge (
81
+ @return token-utils .merge-all (
82
82
get-unthemable-tokens (),
83
- map .merge (
84
- get-color-tokens (token-utils .$placeholder-color-config ),
85
- map .merge (
86
- get-typography-tokens (token-utils .$placeholder-typography-config ),
87
- get-density-tokens (token-utils .$placeholder-density-config )
88
- )
89
- )
83
+ get-color-tokens (token-utils .$placeholder-color-config ),
84
+ get-typography-tokens (token-utils .$placeholder-typography-config ),
85
+ get-density-tokens (token-utils .$placeholder-density-config )
90
86
);
91
87
}
You can’t perform that action at this time.
0 commit comments