Skip to Content
ReferenceLanding anchor navigation

Landing anchor navigation

Summary, Impact, and Experience use a shared clearance equal to the fixed header height plus 2rem below the viewport top. The header space is reserved even while it is hidden, so upward and downward arrivals use the same position. The root font size scales with the viewport, so the clearance scales with it.

The section IDs stay on the outer containers for active-section tracking. HashScroll adds the heading’s layout offset inside the sticky wrapper to the section’s document position. It excludes transforms and the current sticky position. The wrapper uses flow-root to contain the content margins and pins at a negative offset so the heading can reach the reading position. Summary’s heading stays at its layout position; its subtitle and gallery keep their scroll effects.

Both immediate route arrivals and same-page Lenis scrolling use the same calculation. Reduced motion arrives immediately. Wheel, touch, and navigation keys can interrupt scrolling. Selecting the current hash again realigns it without adding a history entry.

Run the browser regression checks against a running production server:

pnpm build pnpm start -p 3000 # In another terminal: PROBE_BASE=http://localhost:3000 node scripts/probes/anchor-alignment.mjs

The probe covers all three destinations at desktop and mobile widths with motion and reduced motion, including clicks, Back/Forward, resizing, direct loads, and cross-route navigation. Set PROBE_SCREENSHOTS to an absolute filename prefix to capture each arrival.