fix: tweak slide section animation

This commit is contained in:
Ilia Mashkov
2026-05-21 18:00:12 +03:00
parent f121443e52
commit 4d54947a91
+4 -2
View File
@@ -95,6 +95,8 @@
--duration-slow: 350ms;
--duration-spring: 220ms;
--delay-normal: 200ms;
--slide-section-body-in: clamp(1.25rem, 5vw, 3rem);
--slide-section-body-out: clamp(0.5rem, 1.5vw, 0.75rem);
}
@theme inline {
@@ -397,14 +399,14 @@
}
to {
opacity: 0;
transform: translateX(-12px) scale(0.98);
transform: translateX(calc(-1 * var(--slide-section-body-out))) scale(0.98);
}
}
@keyframes section-body-in {
from {
opacity: 0;
transform: translateX(48px) scale(0.98);
transform: translateX(var(--slide-section-body-in)) scale(0.98);
}
to {
opacity: 1;