Skip to content

Commit ca5d0f1

Browse files
committed
!fixup fix(material/list): tokenize space around leading icon
1 parent c88c598 commit ca5d0f1

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/material/list/_list-theme.scss

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
@else {
2323
@include sass-utils.current-selector-or-root() {
2424
@include mdc-list-theme.theme(tokens-mdc-list.get-unthemable-tokens());
25+
@include token-utils.create-token-values(
26+
tokens-mat-list.$prefix, tokens-mat-list.get-unthemable-tokens());
2527
}
2628
}
2729
}
@@ -36,6 +38,8 @@
3638
// Add values for MDC list tokens.
3739
@include sass-utils.current-selector-or-root() {
3840
@include mdc-list-theme.theme($mdc-list-color-tokens);
41+
@include token-utils.create-token-values(
42+
tokens-mat-list.$prefix, tokens-mat-list.get-color-tokens($theme));
3943
}
4044

4145
.mdc-list-item__start,
@@ -150,6 +154,8 @@
150154
// Add values for MDC list tokens.
151155
@include sass-utils.current-selector-or-root() {
152156
@include mdc-list-theme.theme($mdc-list-typography-tokens);
157+
@include token-utils.create-token-values(
158+
tokens-mat-list.$prefix, tokens-mat-list.get-typography-tokens($theme));
153159
}
154160

155161
// MDC does not have tokens for the subheader.
@@ -182,10 +188,8 @@
182188
}
183189

184190
@mixin _theme-from-tokens($tokens) {
185-
@if ($tokens != ()) {
186-
@include mdc-list-theme.theme(map.get($tokens, tokens-mdc-list.$prefix));
191+
@include mdc-list-theme.theme(token-utils.get-tokens-for($tokens, tokens-mdc-list.$prefix));
187192

188-
$mat-list-tokens: token-utils.get-tokens-for($tokens, tokens-mat-list.$prefix);
189-
@include token-utils.create-token-values(tokens-mat-list.$prefix, $mat-list-tokens);
190-
}
193+
$mat-list-tokens: token-utils.get-tokens-for($tokens, tokens-mat-list.$prefix);
194+
@include token-utils.create-token-values(tokens-mat-list.$prefix, $mat-list-tokens);
191195
}

src/material/list/list.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,7 @@ mat-action-list button {
200200
@include token-utils.use-tokens(m2-mat-list.$prefix,
201201
m2-mat-list.get-token-slots()) {
202202
.mdc-list-item--with-leading-icon .mdc-list-item__start {
203-
@include token-utils.create-token-slot(margin-left, list-item-leading-icon-start-space);
204-
@include token-utils.create-token-slot(margin-right, list-item-leading-icon-end-space);
205-
[dir='rtl'] & {
206-
@include token-utils.create-token-slot(margin-right, list-item-leading-icon-start-space);
207-
@include token-utils.create-token-slot(margin-left, list-item-leading-icon-end-space);
208-
}
203+
@include token-utils.create-token-slot(margin-inline-start, list-item-leading-icon-start-space);
204+
@include token-utils.create-token-slot(margin-inline-end, list-item-leading-icon-end-space);
209205
}
210206
}

0 commit comments

Comments
 (0)