-
Notifications
You must be signed in to change notification settings - Fork 6.8k
update(slide-toggle): add focus indicator #475
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
Merged
jelbourn
merged 1 commit into
angular:master
from
devversion:update/slide-toggle-focus-indicator
May 23, 2016
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,32 +37,40 @@ | |
display: table; | ||
} | ||
} | ||
@mixin md-temporary-ink-ripple($component) { | ||
|
||
/** | ||
* A mixin, which generates temporary ink ripple on a given component. | ||
* When $bindToParent is set to true, it will check for the focused class on the same selector as you included | ||
* that mixin. | ||
* It is also possible to specify the color palette of the temporary ripple. By default it uses the | ||
* accent palette for its background. | ||
*/ | ||
@mixin md-temporary-ink-ripple($component, $bindToParent: false, $palette: $md-accent) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you expand the comment to explain what There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Everything updated now 👍 |
||
// TODO(mtlin): Replace when ink ripple component is implemented. | ||
// A placeholder ink ripple, shown when keyboard focused. | ||
.md-ink-ripple { | ||
background-color: md-color($md-accent); | ||
border-radius: 50%; | ||
opacity: 0; | ||
height: 48px; | ||
left: 50%; | ||
opacity: 0; | ||
overflow: hidden; | ||
pointer-events: none; | ||
position: absolute; | ||
top: 50%; | ||
transform: translate(-50%,-50%); | ||
transition: opacity ease 0.28s, background-color ease 0.28s; | ||
width: 48px; | ||
} | ||
|
||
// Fade in when radio focused. | ||
.md-#{$component}-focused & { | ||
opacity: 0.1; | ||
} | ||
// Fade in when radio focused. | ||
#{if($bindToParent, '&', '')}.md-#{$component}-focused .md-ink-ripple { | ||
opacity: 1; | ||
background-color: md-color($palette, 0.26); | ||
} | ||
|
||
// TODO(mtlin): This corresponds to disabled focus state, but it's unclear how to enter into | ||
// this state. | ||
.md-#{$component}-disabled & { | ||
background: #000; | ||
} | ||
// TODO(mtlin): This corresponds to disabled focus state, but it's unclear how to enter into | ||
// this state. | ||
#{if($bindToParent, '&', '')}.md-#{$component}-disabled .md-ink-ripple { | ||
background-color: #000; | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
FYI: I know, this could be grouped up, into one mixin. But since this is quite temporary and more clear, I decided to do it this way.