feat: add top and bottom sticky mobile navigation#1780
Merged
Rich-Harris merged 4 commits intomainfrom Feb 22, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
79cefa7 to
d6fb3f0
Compare
theetrain
commented
Feb 10, 2026
| height: 4.8rem; | ||
| padding: 0 var(--sk-page-padding-side); | ||
| z-index: 2; | ||
| z-index: 10; |
Contributor
Author
There was a problem hiding this comment.
This was necessary to prevent headings from covering the 'back to docs' button.
Contributor
Author
- Add top and bottom sticky nav headings in mobile nav
- And make sticky header experience visible when nav area is 450 pixels tall or greater
- Style menu list items to include a left space and vertical border to differentiate itself from headings and subtly indicate scrollability.
04d8a17 to
5a90723
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Changes
Svelte.Sticky.Mobile.Nav.Headers.mov
This was motivated by it being challenging for me to discover and navigate to CLI or MCP docs that are far down the navigation container.
Tested on:
Test scenarios:
Some notes:
<section>elements were removed since they didn't seem to add more value than the nav headings themselves. Withoutaria-labelledby, the<section>elements didn't seem to serve much purpose; and with them gone, it's now possible to make section headings sticky on the top and bottom. I'll verify this later to make doubly sure since I'm running with the assumption that screen readers may navigate by headings sufficiently within the<nav>landmark.Some todos:
Before submitting the PR, please make sure you do the following
feat:,fix:,chore:, ordocs:.