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-experimental/slide-toggle): redefine more variables #18908

Merged
merged 1 commit into from Mar 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -13,9 +13,17 @@
// Save original values of MDC global variables. We need to save these so we can restore the
// variables to their original values and prevent unintended side effects from using this mixin.
$orig-mdc-switch-baseline-theme-color: $mdc-switch-baseline-theme-color;
$orig-mdc-switch-toggled-off-thumb-color: $mdc-switch-toggled-off-thumb-color;
$orig-mdc-switch-toggled-off-track-color: $mdc-switch-toggled-off-track-color;
$orig-mdc-switch-disabled-thumb-color: $mdc-switch-disabled-thumb-color;
$orig-mdc-switch-disabled-track-color: $mdc-switch-disabled-track-color;

@include mat-using-mdc-theme($theme) {
$mdc-switch-baseline-theme-color: primary !global;
$mdc-switch-toggled-off-thumb-color: mdc-theme-prop-value(surface) !global;
$mdc-switch-toggled-off-track-color: mdc-theme-prop-value(on-surface) !global;
$mdc-switch-disabled-thumb-color: mdc-theme-prop-value(surface) !global;
$mdc-switch-disabled-track-color: mdc-theme-prop-value(on-surface) !global;

@include mdc-form-field-core-styles($query: $mat-theme-styles-query);

Expand Down Expand Up @@ -63,6 +71,10 @@

// Restore original values of MDC global variables.
$mdc-switch-baseline-theme-color: $orig-mdc-switch-baseline-theme-color !global;
$mdc-switch-toggled-off-thumb-color: $orig-mdc-switch-toggled-off-thumb-color !global;
$mdc-switch-toggled-off-track-color: $orig-mdc-switch-toggled-off-track-color !global;
$mdc-switch-disabled-thumb-color: $orig-mdc-switch-disabled-thumb-color !global;
$mdc-switch-disabled-track-color: $orig-mdc-switch-disabled-track-color !global;
}

@mixin mat-mdc-slide-toggle-typography($config) {
Expand Down