diff --git a/src/components/common/PageTransition.scss b/src/components/common/PageTransition.scss index 937f438..2b867b4 100644 --- a/src/components/common/PageTransition.scss +++ b/src/components/common/PageTransition.scss @@ -14,7 +14,6 @@ gap: $spacing-lg; min-height: 0; flex: 1; - will-change: transform, opacity; // During animation, exit layer uses absolute positioning &--exit { @@ -26,6 +25,10 @@ } } + &--animating &__layer { + will-change: transform, opacity; + } + // When both layers exist, current layer also needs positioning &--animating &__layer:not(&__layer--exit) { position: relative; diff --git a/src/components/common/PageTransition.tsx b/src/components/common/PageTransition.tsx index aa614bf..ab15477 100644 --- a/src/components/common/PageTransition.tsx +++ b/src/components/common/PageTransition.tsx @@ -131,6 +131,7 @@ export function PageTransition({ opacity: 1, duration: TRANSITION_DURATION, ease: 'power2.in', // slow start, fast end + clearProps: 'transform,opacity', }, 0 );