Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/slider): Emit tokens under mixin root selector #27597

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/material/slider/_slider-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@

$mat-slider-color-tokens: tokens-mat-slider.get-color-tokens($theme);

// Add values for MDC slider tokens.
.mat-mdc-slider {
@include mdc-slider-theme.theme($mdc-color-tokens);
@include _slider-ripple-color($theme, primary);
@include token-utils.create-token-values(
tokens-mat-slider.$prefix,
$mat-slider-color-tokens
);
// Add values for MDC slider tokens.
@include sass-utils.current-selector-or-root() {
@include mdc-slider-theme.theme($mdc-color-tokens);
@include _slider-ripple-color($theme, primary);
@include token-utils.create-token-values(
tokens-mat-slider.$prefix,
$mat-slider-color-tokens
);

&.mat-accent {
@include mdc-slider-theme.theme(
tokens-mdc-slider.private-get-color-palette-color-tokens($theme, accent));
@include _slider-ripple-color($theme, accent);
}
.mat-accent {
@include mdc-slider-theme.theme(
tokens-mdc-slider.private-get-color-palette-color-tokens($theme, accent));
@include _slider-ripple-color($theme, accent);
}

&.mat-warn {
.mat-warn {
@include mdc-slider-theme.theme(
tokens-mdc-slider.private-get-color-palette-color-tokens($theme, warn));
@include _slider-ripple-color($theme, warn);
Expand All @@ -65,7 +65,7 @@
}
@else {
// Add values for MDC slider tokens.
.mat-mdc-slider {
@include sass-utils.current-selector-or-root() {
@include mdc-slider-theme.theme(tokens-mdc-slider.get-typography-tokens($theme));
}
}
Expand All @@ -77,7 +77,7 @@
}
@else {
// Add values for MDC slider tokens.
.mat-mdc-slider {
@include sass-utils.current-selector-or-root() {
@include mdc-slider-theme.theme(tokens-mdc-slider.get-density-tokens($theme));
}
}
Expand Down
Loading