Commit c637590
committed
Hero h1 morphs into the top-left wordmark on scroll
Previously the hero just scaled-down-and-faded centered. Per the
make-interfaces-feel-better skill, the panel should hand off
visually to the sticky header's brand wordmark — a shared-element
transition that explains where the title GOES, not just that it
disappears.
Four scroll-driven animations, all opacity/transform/filter only:
hero-fade 0-280px .hero opacity 1→0, scale 1→0.92,
translateY 0→-8px (panel dissolves)
hero-h1-morph 0-240px h1 transform-origin top-left,
scale 1→0.32, translate 0→(-32%,-50%)
so it heads toward the top-left
corner where the brand wordmark sits
hero-p-fade 0-140px tagline fades early (the h1 carries
the show on its own past 140px)
brand-reveal 80-240px .brand opacity 0→1, scale 0.88→1,
filter blur(4px)→0. Coming-into-
focus reveal, staggered to start
while the h1 is still en route.
header-solidify 0-240px background 0.82→0.95 + shadow.
Gives the header weight as it takes
over from the hero panel.
Two safety gates from impeccable + make-interfaces:
@supports (animation-timeline: scroll()) — older browsers see
the static layout,
brand stays visible
by default.
@media (prefers-reduced-motion: no-preference) — reduced-motion
users skip it.
Brand hiding is scoped with body:has(.hero) so /examples/<slug>
and /journeys/<slug> pages (no hero) keep their brand visible from
the start — the morph only applies on home.
Per the skill: animations only specify exact properties (opacity,
transform, filter), not `transition: all`. No will-change because
scroll-driven animations are already on the compositor on modern
engines.
62 tests pass; lint clean.1 parent 87a4dcf commit c637590
3 files changed
Lines changed: 36 additions & 12 deletions
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
41 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
42 | 54 | | |
43 | 55 | | |
44 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
41 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
42 | 54 | | |
43 | 55 | | |
44 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
0 commit comments