mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(button): hover styles being applied to disabled buttons (#909)
Fixes the button hover styles being applied, even if a button is disabled. Fixes #866.
This commit is contained in:
committed by
Jeremy Elbourn
parent
8828358511
commit
21e419daed
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user