Disable Carousel arrow on devices with no hover
This commit is contained in:
@@ -88,16 +88,20 @@
|
|||||||
// Arrow
|
// Arrow
|
||||||
&__arrow {
|
&__arrow {
|
||||||
$color-shadow: rgba(#000, 0.075);
|
$color-shadow: rgba(#000, 0.075);
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
// Enable only on devices with hover
|
||||||
left: 0;
|
@media (hover: hover) {
|
||||||
opacity: 0;
|
position: absolute;
|
||||||
pointer-events: none;
|
top: 0;
|
||||||
display: block;
|
left: 0;
|
||||||
transform: translate3d(var(--x), var(--y), 0);
|
opacity: 0;
|
||||||
transition: transform 0.6s var(--ease-quart), opacity 0.6s var(--ease-quart);
|
display: block;
|
||||||
transform-origin: 50% 50%;
|
pointer-events: none;
|
||||||
filter: drop-shadow(0 2px 2px $color-shadow) drop-shadow(0 8px 8px $color-shadow) drop-shadow(0 16px 16px $color-shadow);
|
transform: translate3d(var(--x), var(--y), 0);
|
||||||
|
transition: transform 0.6s var(--ease-quart), opacity 0.6s var(--ease-quart);
|
||||||
|
transform-origin: 50% 50%;
|
||||||
|
filter: drop-shadow(0 2px 2px $color-shadow) drop-shadow(0 8px 8px $color-shadow) drop-shadow(0 16px 16px $color-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
Reference in New Issue
Block a user