Skip to content

Conversation

@joshuadavidthomas
Copy link
Contributor

Problem

Anchor navigation on the docs pages (e.g., /docs#requirements) resulted in headings being obscured behind the sticky header.

The existing scroll-mt-20 was on the wrong element. It was applied to the <h2>/<h3> tag, but the id attribute was on the parent <div>. Scroll margin only works on the element that has the anchor ID.

Additionally, there were duplicate IDs - both the <section> and inner <div> had the same ID - so the browser scrolled to the <section> which had no scroll margin at all.

Fix

  • Moved scroll-mt-20 to the elements that actually have the anchor IDs (<section> and <div> elements with data-section)
  • Removed duplicate IDs from SectionHeader

I considered consolidating the wrapper <div> around all the SectionHeader components, but went with the simple naive approach for the fix.

Add scroll-mt-20 to section and div elements with anchor IDs to prevent
headings from being obscured by the sticky header when navigating via
anchor links. Also removes duplicate IDs from SectionHeader component
since parent elements already have the IDs.
@netlify
Copy link

netlify bot commented Jan 29, 2026

👷 Deploy request for opensyncsessions pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 9d93ac0

@joshuadavidthomas joshuadavidthomas changed the title fix: add scroll margin to docs anchors for sticky header fix: move scroll margin for docs anchors to correct element Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant