Compare commits

...

3 commits

Author SHA1 Message Date
Matthew Phillips
51fc960525 ms 2023-08-30 17:26:46 -04:00
Matthew Phillips
26ba25a2f2 changeset 2023-08-30 17:19:35 -04:00
Matthew Phillips
8200a8ab40 Spike: change default root animation 2023-08-30 17:15:19 -04:00
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Improve the default fallback animation

View file

@ -43,6 +43,36 @@
} }
} }
@layer astro {
::view-transition-old(root) {
animation-name: astroFadeOut;
animation-duration: 180ms;
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
animation-fill-mode: both;
}
::view-transition-new(root) {
animation-name: astroFadeIn;
animation-duration: 180ms;
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
animation-fill-mode: both;
}
}
:root[data-astro-transition-fallback="old"]:not([data-astro-transition-scope]) {
animation-name: astroFadeOut;
animation-duration: 180ms;
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
animation-fill-mode: both;
}
:root[data-astro-transition-fallback="new"]:not([data-astro-transition-scope]) {
animation-name: astroFadeIn;
animation-duration: 180ms;
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
animation-fill-mode: both;
}
@media (prefers-reduced-motion) { @media (prefers-reduced-motion) {
::view-transition-group(*), ::view-transition-group(*),
::view-transition-old(*), ::view-transition-old(*),