fix(decnet_web/Layout): kill residual theme-swap open flash
Even with fill: 'both', the new pseudo paints once at its default style (no clip-path = full size) before the JS animation registers — the brief open flash that survived the previous fix. Pre-publish click coords as --reveal-x / --reveal-y on <html> before calling startViewTransition. The static CSS rule on ::view-transition-new(root) now sets clip-path: circle(0px at var(--reveal-x) var(--reveal-y)) as the pseudo's default, so the very first paint is already fully clipped. The animation then grows the circle outward from there.
This commit is contained in:
@@ -359,6 +359,13 @@ input:focus {
|
||||
}
|
||||
::view-transition-new(root) {
|
||||
z-index: 1;
|
||||
/* Default clip-path: a zero-radius circle at the click point
|
||||
* (--reveal-x / --reveal-y are written to <html> by
|
||||
* useThemeToggle.ts BEFORE startViewTransition runs). The
|
||||
* pseudo therefore renders fully clipped on its very first
|
||||
* frame — no opening flash possible. The web-animation then
|
||||
* grows the circle outward; fill: 'both' pins the end. */
|
||||
clip-path: circle(0px at var(--reveal-x, 50%) var(--reveal-y, 50%));
|
||||
}
|
||||
|
||||
/* ── Scrollbar ─────────────────────────────────── */
|
||||
|
||||
Reference in New Issue
Block a user