-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
mat-slider-toggle not using correct color. (ignoring hue) #11854
Comments
Previously, with the old Material Design guidelines, the hue colors were explicitly defined (e.g. see #1568) checked = Hue 500 (light);
checked = Hue 200 (dark) I'm not sure whether it makes sense to use the The slide-toggle won't always look good in dark themes by default, meaning that the user needs to customize his palette and adjust the However I see that there needs to be a way to match those colors. One possibility would be to default to the current logic if the |
@devversion In my opinion it make sense to use the default hue. That's because it it a formcontrol and all other formcontrols AFAIK do use the hue. |
I've mentioned the issue in the team meeting and since it would be a visually breaking change we don't want to switch to the default hue yet. The new design specifications are not very explicit about the proper hue, but the old version was. I will continue researching about the proper hue. Just making clear that this will be a low priority. |
* Instead of hard-coding the hue 500 for the checked color, the `default` hue for a palette should be used (falls back to 500 unless explicitly specified). This is similar to the MDC implementation and what the selection control specs show. * Fixes a missing thing for the 2018 spec alignment: The thumb bar should have a `0.54` opacity of the checked thumb color * Removes duplicate CSS for setting the unchecked ripple color. * Updates spec comments to refer to the reworked Material Design guidelines webpage. Fixes angular#11854
* Instead of hard-coding the hue 500 for the checked color, the `default` hue for a palette should be used (falls back to 500 unless explicitly specified). This is similar to the MDC implementation and what the selection control specs show. * Fixes a missing thing for the 2018 spec alignment: The thumb bar should have a `0.54` opacity of the checked thumb color * Removes duplicate CSS for setting the unchecked ripple color. * Updates spec comments to refer to the reworked Material Design guidelines webpage. Fixes angular#11854
* Instead of hard-coding the hue 500 for the checked color, the `default` hue for a palette should be used (falls back to 500 unless explicitly specified). This is similar to the MDC implementation and what the selection control specs show. * Fixes a missing thing for the 2018 spec alignment: The thumb bar should have a `0.54` opacity of the checked thumb color * Removes duplicate CSS for setting the unchecked ripple color. * Updates spec comments to refer to the reworked Material Design guidelines webpage. Fixes angular#11854
* Instead of hard-coding the hue 500 for the checked color, the `default` hue for a palette should be used (falls back to 500 unless explicitly specified). This is similar to the MDC implementation and what the selection control specs show. * Fixes a missing thing for the 2018 spec alignment: The thumb bar should have a `0.54` opacity of the checked thumb color * Removes duplicate CSS for setting the unchecked ripple color. * Updates spec comments to refer to the reworked Material Design guidelines webpage. Fixes #11854
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
mat-slider-toggle should use the exact same color as the primary color.
What is the current behavior?
It is ignoring the hue/tint (not sure what it is called)
What are the steps to reproduce?
Providing a StackBlitz reproduction is the best way to share your issue.
https://github.com/robindijkhof/mat-slide-toggle
While my primary color is:
$app-primary: mat-palette($mat-blue, 900);
. it is ignoring the 900What is the use-case or motivation for changing an existing behavior?
Incorrect behaviour
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.0.3
Material 6.3.0
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: