mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
refactor(hover): use :hover:not(.disable-hover)
Less CSS specificity issues. Disabling hover on mobile prevents button flickers.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user