Skip to content

Commit

Permalink
fixup! test(material/schematics): Add test for CSS token renames
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalerba committed May 17, 2024
1 parent ffd19e4 commit 8f54edf
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/material/slide-toggle/_slide-toggle-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
$mat-tokens: tokens-mat-switch.get-unthemable-tokens();
$mdc-tokens: tokens-mdc-switch.get-unthemable-tokens();
@include mdc-switch-theme.theme($mdc-tokens);
@include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-tokens);

.mat-mdc-slide-toggle {
@include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-tokens);
}
}
}
}
Expand All @@ -40,7 +43,6 @@
// Add values for MDC slide toggles tokens
@include sass-utils.current-selector-or-root() {
@include mdc-switch-theme.theme($mdc-tokens);
@include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-tokens);

// TODO(wagnermaciel): Use our token system to define this css variable.
--mdc-switch-disabled-label-text-color: #{inspection.get-theme-color(
Expand All @@ -50,6 +52,8 @@
)};

.mat-mdc-slide-toggle {
@include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-tokens);

// Change the color palette related tokens to accent or warn if applicable
&.mat-accent {
@include mdc-switch-theme.theme(
Expand Down Expand Up @@ -79,7 +83,10 @@
// Add values for MDC slide toggle tokens
@include sass-utils.current-selector-or-root() {
@include mdc-switch-theme.theme($mdc-tokens);
@include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-tokens);

.mat-mdc-slide-toggle {
@include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-tokens);
}
}
}
}
Expand All @@ -94,6 +101,10 @@
$mat-tokens: tokens-mat-switch.get-density-tokens($theme);
$mdc-tokens: tokens-mdc-switch.get-density-tokens($theme);
@include mdc-switch-theme.theme(tokens-mdc-switch.get-density-tokens($theme));

.mat-mdc-slide-toggle {
@include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-tokens);
}
}
}
}
Expand Down

0 comments on commit 8f54edf

Please sign in to comment.