refactor(hover): use :hover:not(.disable-hover)

Less CSS specificity issues. Disabling hover on mobile prevents button
flickers.
This commit is contained in:
Adam Bradley
2015-09-24 13:31:35 -05:00
parent 6580f53607
commit 4d84cdae83
8 changed files with 39 additions and 38 deletions

View File

@@ -12,12 +12,10 @@ button[clear],
opacity: 0.4;
}
}
.enable-hover button[clear]:hover,
.enable-hover [button][clear]:hover {
opacity: 0.6;
color: darken-or-lighten($button-color);
&:hover:not(.disable-hover) {
opacity: 0.6;
color: darken-or-lighten($button-color);
}
}
@@ -34,11 +32,10 @@ button[clear],
border-color: transparent;
background: transparent;
color: $fg-color;
}
.enable-hover button[clear][#{$color-name}]:hover,
.enable-hover [button][clear][#{$color-name}]:hover {
color: darken-or-lighten($fg-color);
&:hover:not(.disable-hover) {
color: darken-or-lighten($fg-color);
}
}
}