-
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
fix(slide-toggle): match theme with specs #1612
fix(slide-toggle): match theme with specs #1612
Conversation
} | ||
} | ||
|
||
.md-slide-toggle-thumb { | ||
background-color: md-color($background, background); | ||
background-color: md-color($md-grey, $thumb-off-hue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$thumb-off-hue
is only used in one place, so I would do this here instead:
$thumb-background: if($is-dark, md-color(...), md-color(...));
$primary: map-get($theme, primary); | ||
$accent: map-get($theme, accent); | ||
$warn: map-get($theme, warn); | ||
$background: map-get($theme, background); | ||
$foreground: map-get($theme, foreground); | ||
|
||
$thumb-on-hue: if($is-dark, 200, 500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about $thumb-checked-hue
?
$primary: map-get($theme, primary); | ||
$accent: map-get($theme, accent); | ||
$warn: map-get($theme, warn); | ||
$background: map-get($theme, background); | ||
$foreground: map-get($theme, foreground); | ||
|
||
$thumb-on-hue: if($is-dark, 200, 500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment here with a link to the spec and explaining the use of different hues based on light vs. dark theme?
* Currently the theme stylesheet for the slide-toggle was not following the specs. * This commit ensures that the stylesheet follows the specs with all details (https://material.google.com/components/selection-controls.html#selection-controls-switch) Fixes angular#1568.
c0ef774
to
689ebbf
Compare
LGTM |
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. |
@jelbourn
$thumb-on-hue
- we can't place mixins inside of mixins (so I'd rather make a follow up and discuss possible approaches)Fixes #1568.