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

fix(slide-toggle): match theme with specs #1612

Merged
merged 2 commits into from
Oct 26, 2016

Conversation

devversion
Copy link
Member

--- ---

@jelbourn

  • I assume the way the bar color currently is determined is not looking very good (but it's per specs and I don't wanted to add it to the foreground palette)
  • Regarding passing $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.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 26, 2016
}
}

.md-slide-toggle-thumb {
background-color: md-color($background, background);
background-color: md-color($md-grey, $thumb-off-hue);
Copy link
Member

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);
Copy link
Member

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);
Copy link
Member

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.
@jelbourn
Copy link
Member

LGTM

@jelbourn jelbourn merged commit 596d994 into angular:master Oct 26, 2016
@devversion devversion deleted the fix/slide-toggle-theme-spec branch November 4, 2016 16:29
@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Theme colors incorrect for md-slide-toggle
3 participants