Skip to content

Commit b7a0de3

Browse files
committed
address feedback
1 parent e7947fc commit b7a0de3

File tree

4 files changed

+21
-24
lines changed

4 files changed

+21
-24
lines changed

src/material/core/tokens/_token-utils.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,12 @@ $_component-prefix: null;
7878
@include mdc-theme.property($property, $value);
7979
}
8080
}
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+
}

src/material/core/tokens/m2/mdc/_elevated-card.scss

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,10 @@ $prefix: (mdc, elevated-card);
6969
// Combines the tokens generated by the above functions into a single map with placeholder values.
7070
// This is used to create token slots.
7171
@function get-token-slots() {
72-
@return map.merge(
72+
@return token-utils.merge-all(
7373
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)
8177
);
8278
}

src/material/core/tokens/m2/mdc/_list.scss

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,10 @@ $prefix: (mdc, list);
207207
// Combines the tokens generated by the above functions into a single map with placeholder values.
208208
// This is used to create token slots.
209209
@function get-token-slots() {
210-
@return map.merge(
210+
@return token-utils.merge-all(
211211
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)
219215
);
220216
}

src/material/core/tokens/m2/mdc/_outlined-card.scss

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,10 @@ $prefix: (mdc, outlined-card);
7878
// Combines the tokens generated by the above functions into a single map with placeholder values.
7979
// This is used to create token slots.
8080
@function get-token-slots() {
81-
@return map.merge(
81+
@return token-utils.merge-all(
8282
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)
9086
);
9187
}

0 commit comments

Comments
 (0)