UX: Disable button hover effects on touch devices
This commit is contained in:
parent
9554d657c5
commit
98b9913033
|
@ -54,11 +54,14 @@
|
|||
color: $primary;
|
||||
min-height: unset; // ovverides button defaults
|
||||
}
|
||||
.discourse-no-touch & {
|
||||
// only allow hover on no-touch devices
|
||||
&:hover,
|
||||
&.btn-hover {
|
||||
background: $primary-medium;
|
||||
color: $secondary;
|
||||
}
|
||||
}
|
||||
&[disabled],
|
||||
&.disabled {
|
||||
background: $primary-low;
|
||||
|
@ -89,6 +92,8 @@
|
|||
&[href] {
|
||||
color: $secondary;
|
||||
}
|
||||
.discourse-no-touch & {
|
||||
// only allow hover on no-touch devices
|
||||
&:hover,
|
||||
&.btn-hover {
|
||||
background: dark-light-choose(
|
||||
|
@ -96,6 +101,7 @@
|
|||
scale-color($tertiary, $lightness: 20%)
|
||||
);
|
||||
}
|
||||
}
|
||||
&:active,
|
||||
&.btn-active {
|
||||
@include linear-gradient(
|
||||
|
@ -119,6 +125,8 @@
|
|||
&[href] {
|
||||
color: $secondary;
|
||||
}
|
||||
.discourse-no-touch & {
|
||||
// only allow hover on no-touch devices
|
||||
&:hover,
|
||||
&.btn-hover {
|
||||
background: dark-light-choose(
|
||||
|
@ -126,6 +134,7 @@
|
|||
scale-color($danger, $lightness: 20%)
|
||||
);
|
||||
}
|
||||
}
|
||||
&:active,
|
||||
&.btn-active {
|
||||
@include linear-gradient(scale-color($danger, $lightness: -20%), $danger);
|
||||
|
|
Loading…
Reference in New Issue