Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix table of contents highlighting glitch #1459

Merged
merged 2 commits into from
Feb 5, 2024
Merged

Fix table of contents highlighting glitch #1459

merged 2 commits into from
Feb 5, 2024

Conversation

delucis
Copy link
Member

@delucis delucis commented Feb 5, 2024

Description

  • Fixes Table of Contents Glitch #1448
  • See Table of Contents Glitch #1448 (comment) for full details. TL;DR — larger heading top margins increased the likelihood of the table of contents intersection observer falling between elements.
  • By increasing the height of the zone we watch for intersections, we can avoid this (unless someone adds content with more extreme top margins, at some point this could still break).

Copy link

changeset-bot bot commented Feb 5, 2024

🦋 Changeset detected

Latest commit: 9d0f935

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Feb 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Feb 5, 2024 8:23pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
starlight-i18n ⬜️ Ignored (Inspect) Feb 5, 2024 8:23pm

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Feb 5, 2024
@astrobot-houston
Copy link
Collaborator

size-limit report 📦

Path Size
/index.html 5.22 KB (-0.02% 🔽)
/_astro/*.js 21.54 KB (-0.02% 🔽)
/_astro/*.css 13.14 KB (0%)

Copy link
Member

@TheOtterlord TheOtterlord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great! Tested on a few resolutions and pages, and everything worked as expected!

@delucis delucis merged commit 9a8e0ec into main Feb 5, 2024
10 checks passed
@delucis delucis deleted the dx-983/toc-fix branch February 5, 2024 21:08
@astrobot-houston astrobot-houston mentioned this pull request Feb 5, 2024
@SatanshuMishra
Copy link

This is great, Nice job @delucis!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table of Contents Glitch
4 participants