Skip to content

Commit

Permalink
fix(material/list): Emit tokens under mixin root selector
Browse files Browse the repository at this point in the history
  • Loading branch information
amysorto committed Aug 25, 2023
1 parent 6c724c7 commit 297e1d2
Showing 1 changed file with 8 additions and 25 deletions.
33 changes: 8 additions & 25 deletions src/material/list/_list-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,22 @@


// Add values for MDC list tokens.
.mat-mdc-list-base {
@include sass-utils.current-selector-or-root() {
@include mdc-list-theme.theme($mdc-list-color-tokens);
}

.mdc-list-item__start,
.mdc-list-item__end {
@include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($inner-control-primary));
}
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($inner-control-primary));

.mat-accent {
.mdc-list-item__start,
.mdc-list-item__end {
.mat-accent {
@include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($inner-control-accent));
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($inner-control-accent));
}
}

.mat-warn {
.mdc-list-item__start,
.mdc-list-item__end {
.mat-warn {
@include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($inner-control-warn));
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($inner-control-warn));
}
}

.mat-mdc-list-option {
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($inner-control-primary));
}
.mat-mdc-list-option.mat-accent {
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($inner-control-accent));
}
.mat-mdc-list-option.mat-warn {
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($inner-control-warn));
}

// There is no token for activated color on nav list.
// TODO(mmalerba): Add a token to MDC or make a custom one.
.mat-mdc-list-base.mat-mdc-list-base {
Expand All @@ -87,7 +70,7 @@
$mdc-list-density-tokens: tokens-mdc-list.get-density-tokens($density-scale);

// Add values for MDC list tokens.
.mat-mdc-list-base {
@include sass-utils.current-selector-or-root() {
@include mdc-list-theme.theme($mdc-list-density-tokens);
}

Expand Down Expand Up @@ -130,7 +113,7 @@
$mdc-list-typography-tokens: tokens-mdc-list.get-typography-tokens($config);

// Add values for MDC list tokens.
.mat-mdc-list-base {
@include sass-utils.current-selector-or-root() {
@include mdc-list-theme.theme($mdc-list-typography-tokens);
}

Expand Down

0 comments on commit 297e1d2

Please sign in to comment.