UX: Disable button hover effects on touch devices

This commit is contained in:
Kris 2018-10-04 17:15:37 -04:00
parent 9554d657c5
commit 98b9913033
1 changed files with 25 additions and 16 deletions

View File

@ -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);