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

Slide-toggle theme color does not follow app theme definition, but is fixed at 500 level default #13044

Closed
MichaelScottBurke opened this issue Sep 8, 2018 · 2 comments

Comments

@MichaelScottBurke
Copy link

MichaelScottBurke commented Sep 8, 2018

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?

  1. ) 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);
  1. Compare Switch (slide-toggle) to other theme-able components

screen shot 2018-09-08 at 9 26 04 am

  1. 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);
@MichaelScottBurke MichaelScottBurke changed the title Slide Toggle theme color does not follow app theme definition, but is fixed at 500 level default Slide-toggle theme color does not follow app theme definition, but is fixed at 500 level default Sep 8, 2018
@MichaelScottBurke
Copy link
Author

MichaelScottBurke commented Sep 8, 2018

Closing as this is a duplicate of 12698 and 11854

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant