fix(decnet_web/Layout): theme swap end-of-animation flash

Without fill: 'forwards' the clip-path keyframes release at
animation end and the pseudo reverts to its computed style
(no clip-path), so the old layer flashes back at full size for
a frame before View Transitions tears the pseudo-elements down.
Pinning the final keyframe with fill-forwards keeps the old
layer fully clipped through to teardown.
This commit is contained in:
2026-05-09 04:15:44 -04:00
parent a81ea3f973
commit 6d1fc3a081

View File

@@ -86,6 +86,11 @@ function animateSwap(next: Theme, x: number, y: number): void {
duration: 520,
easing: 'cubic-bezier(0.4, 0, 0.2, 1)',
pseudoElement: '::view-transition-old(root)',
/* Without 'forwards' the keyframes release on completion
* and the pseudo reverts to its computed style (no
* clip-path), making the old layer flash back at full
* size for a frame before View Transitions tears it down. */
fill: 'forwards',
},
);
}).catch(() => { /* user-cancelled or unsupported pseudo, ignore */ });