summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-10-16 10:16:01 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-10-16 10:16:01 +0200
commit715af9e8979a344c2b35433ea612f80f3f4270bf (patch)
tree61743e086f87d53a3c1d710f5b3881d97d1421d3 /src
parent18f983dfa5123ad05e73a8cab0a9f754b05cf4a3 (diff)
Experiment with view transitions
Diffstat (limited to 'src')
-rw-r--r--src/style.css22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/style.css b/src/style.css
index c920dc8..843e9da 100644
--- a/src/style.css
+++ b/src/style.css
@@ -30,6 +30,28 @@
}
}
+@keyframes move-out {
+ from { transform: translateY(0%); }
+ to { transform: translateY(-100%); }
+}
+
+@keyframes move-in {
+ from { transform: translateY(100%); }
+ to { transform: translateY(0%); }
+}
+
+@view-transition {
+ navigation: auto;
+}
+
+::view-transition-old(root) {
+ animation: 0.4s ease-in both move-out;
+}
+
+::view-transition-new(root) {
+ animation: 0.4s ease-in both move-in;
+}
+
@media (max-width: 750px) {
h1 { font-size: 2.0rem; }
h2 { font-size: 1.5rem; }