Manage Carousel arrow rotation depending on the current slide

Right only when first and Left only when last
This commit is contained in:
2021-11-03 18:45:18 +01:00
parent 365b8f5390
commit 18f2e324c7
2 changed files with 29 additions and 13 deletions

View File

@@ -97,9 +97,16 @@
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 {
display: block;
transition: transform 0.6s var(--ease-quart);
}
// Flipped for previous direction
&.is-flipped {
transform: translate3d(var(--x), var(--y), 0) rotate(-180deg);
svg {
transform: rotate(-180deg);
}
}
}