Skip to content

Instantly share code, notes, and snippets.

@artlung
Created December 3, 2025 23:13
Show Gist options
  • Select an option

  • Save artlung/b5800168c3e197e09dd664c40c36643f to your computer and use it in GitHub Desktop.

Select an option

Save artlung/b5800168c3e197e09dd664c40c36643f to your computer and use it in GitHub Desktop.
Transitions on artlung.com as of 2025-12-03
@view-transition {
navigation: auto;
}
/* Customize the default animation behavior */
// TODO:
// view transition name
// view transition class
::view-transition-group(root) {
animation-duration: 0.5s;
}
/* Create a custom animation */
@keyframes move-out {
from {
transform: translateY(0%);
opacity: 1;
}
to {
transform: translateY(-100%);
opacity: 0;
}
}
@keyframes move-in {
from {
transform: translateY(100%);
opacity: 0;
}
to {
transform: translateY(0%);
opacity: 1;
}
}
/* Apply the custom animation to the old and new page states */
::view-transition-old(root) {
animation: 0.4s ease-in both move-out;
}
::view-transition-new(root) {
animation: 0.4s ease-in both move-in;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment