Closed
Description
Bug:
slide toggle does not match app theme definition when base is set (to a value other than the default 500 'level')
What is the expected behavior?
That Slide-toggle @input() color: ThemePalette matches app theme definition when base is defined so that slide-toggle will match other themed components
What is the current behavior?
Slide toggle is fixed at the 500 level for each theme color: e.g., primary, accent and warn.
What are the steps to reproduce?
- ) set app theme to values other than default; e.g.,
@import '~@angular/material/theming';
@include mat-core();
$primary: mat-palette($mat-teal, 700, 300, 900);
$accent: mat-palette($mat-blue, 900, 300, 900);
$warn: mat-palette($mat-red, 900, 300, 800);
$my-theme: mat-light-theme($primary, $accent, $warn);
@include angular-material-theme($my-theme);
- Compare Switch (slide-toggle) to other theme-able components
- Inspect hex value; e.g.,: version with 'accent' (mat-blue palette) theme color applied:
button: #0d47a1 = 700 (accent, base from mat-blue-palette)
chip: #0d47a1 = 700
slide toggle: #2196f3 = 500
What is the use-case or motivation for changing an existing behavior?
The switch does not match my other themed components, it is lighter
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6+, Angular Material 6+, mac os, all browsers
Is there anything else we should know?
issues seems to be in setting the thumb-checked-hue to 'default' in light theme in the slide-toggle theme
...
$thumb-checked-hue: if($is-dark, 200, default);
Metadata
Metadata
Assignees
Labels
No labels