aboutsummaryrefslogtreecommitdiff
path: root/src/styles
diff options
context:
space:
mode:
Diffstat (limited to 'src/styles')
-rw-r--r--src/styles/motion.css22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/styles/motion.css b/src/styles/motion.css
index 28de2180..857928d4 100644
--- a/src/styles/motion.css
+++ b/src/styles/motion.css
@@ -5,3 +5,25 @@
--duration-base: 0.24s;
--duration-slow: 0.4s;
}
+
+::view-transition-old(root) {
+ animation: vt-slide-out var(--duration-base) var(--ease-out-quart) both;
+}
+
+::view-transition-new(root) {
+ animation: vt-slide-in var(--duration-base) var(--ease-out-quart) both;
+}
+
+@keyframes vt-slide-out {
+ to {
+ transform: translateX(calc(var(--vt-direction, 1) * -200px));
+ opacity: 0;
+ }
+}
+
+@keyframes vt-slide-in {
+ from {
+ transform: translateX(calc(var(--vt-direction, 1) * 200px));
+ opacity: 0;
+ }
+}