Skip to content

fix(slide-toggle): use default hue for thumb in dark theme #14230

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

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
8 changes: 5 additions & 3 deletions src/lib/slide-toggle/_slide-toggle-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@

// Color hues are based on the specs which briefly show the hues that are applied to a switch.
// The 2018 specs no longer describe how dark switches should look like. Due to the lack of
// information for dark themed switches, we keep the old behavior that is based on the previous
// specifications. See: https://material.io/design/components/selection-controls.html#specs
// information for dark themed switches, we partially keep the old behavior that is based on
// the previous specifications. For the checked color we always use the `default` hue because
// that follows MDC and also makes it easier for people to create a custom theme without needing
// to specify each hue individually.
$thumb-unchecked-hue: if($is-dark, 400, 50);
$thumb-checked-hue: if($is-dark, 200, default);
$thumb-checked-hue: default;

$bar-unchecked-color: mat-color($foreground, disabled);
$ripple-unchecked-color: mat-color($foreground, base);
Expand Down