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

Show more headings in the table of contents #25

Merged
merged 1 commit into from May 6, 2021

Conversation

rik
Copy link
Contributor

@rik rik commented May 6, 2021

  • Add h3 and h4 in the table of contents
  • When the table of contents is taller than the viewport's height, it will now be scrollable
  • Scroll the active table of content link in view if needed
  • Mark <a> as active instead of <li> so the border is only as tall as the active heading
  • Remove the bold styling for active to prevent content jump when a link takes one extra line when bolded

This makes the scripting TOC much more useful to send anchor links.

- Add h3 and h4 in the table of contents
- When the table of contents is taller than the viewport's height, it will now be scrollable
- Scroll the active table of content link in view if needed
- Mark `<a>` as active instead of `<li>` so the border is only as tall as the active heading
- Remove the bold styling for active to prevent content jump when a link takes one extra line when bolded
@netlify
Copy link

netlify bot commented May 6, 2021

Deploy request for webpagetest-documentation accepted.

Accepted with commit 9ad28ee

https://app.netlify.com/sites/webpagetest-documentation/deploys/6093d7ec337f6200077ce523

Copy link
Contributor

@tkadlec tkadlec left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks @rik!

@tkadlec tkadlec merged commit 18e78d8 into catchpoint:main May 6, 2021
@rik rik deleted the more-headings-in-toc branch May 6, 2021 14:10
tannerhodges added a commit to tannerhodges/webpagetest-docs that referenced this pull request Jun 25, 2022
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.

None yet

2 participants