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(button): hover styles being applied to disabled buttons #909

Merged
merged 1 commit into from
Aug 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
@import 'button-base';

// TODO(kara): Replace attribute selectors with class selectors when possible
[md-button] {
[md-button], [md-icon-button] {
@extend %md-button-base;

// Only flat buttons and icon buttons (not raised or fabs) have a hover style.
&:hover {
// Use the same visual treatment for hover as for focus.
@include md-button-focus();
}

&[disabled]:hover {
&.md-primary, &.md-accent, &.md-warn, &:hover {
&.md-primary, &.md-accent, &.md-warn, &::after {
background-color: transparent;
}
}
Expand Down Expand Up @@ -60,12 +66,6 @@
z-index: 1;
}

// Only flat buttons and icon buttons (not raised or fabs) have a hover style.
[md-button]:hover, [md-icon-button]:hover {
// Use the same visual treatment for hover as for focus.
@include md-button-focus();
}

// Applies a clearer border for high-contrast mode (a11y)
@media screen and (-ms-high-contrast: active) {
.md-raised-button, .md-fab, .md-mini-fab {
Expand Down