Commit 263f875
committed
@ Banner: drop column morph + .enter to stop SPA-nav glitches
Two related glitches when navigating between / and a sketch:
- "Page slides down dramatically + fades" on outbound nav from a
pinned state. Cause: <section class="column" transition:name="column">
made the browser morph column's bbox between OLD and NEW pages
during view transition. With pinned sticky descendants, OLD column
is much taller (banner at e.g. 21% relative offset); NEW sketch
column is ~1500px, scaling that 21% lands the banner at viewport
y≈315 — a ~250px drop during the morph, with h1 and list items
getting the same treatment. Amplitude tracked scroll position
because higher scroll = higher relative offset in OLD column.
Removing the name leaves the column under Astro's generic page
fade; nothing repositions. Stage keeps its name (canvas needs to
persist across nav).
- Banner sometimes invisible after SPA nav back from a sketch. The
banner-wrap had .enter class which sets opacity: 0 in its initial
keyframe with animation-fill-mode: both. If the animation timeline
paused / stalled (view transitions can suspend it), the banner
was stranded at opacity 0 even though init() runs synchronously
to remove the class — there was a race window. Dropping .enter
from the markup entirely removes the race; h1 / .sub / list items
still get their staggered reveal on first load.
Also gave banner-wrap its own transition:name="banner" as a belt-
and-braces — even if column ever gets a name back, banner now has
an independent pseudo anchored to its own bbox.1 parent dee17f6 commit 263f875
2 files changed
Lines changed: 36 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
66 | 88 | | |
67 | 89 | | |
68 | 90 | | |
| |||
0 commit comments