From 6ce301d7e0225bd39b8203a2bac65fe2e865bd64 Mon Sep 17 00:00:00 2001 From: LTbinglingfeng Date: Fri, 2 Jan 2026 11:17:57 +0800 Subject: [PATCH] fix(transition): avoid HiDPI text blur from page transitions --- src/components/common/PageTransition.scss | 5 ++++- src/components/common/PageTransition.tsx | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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 );