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

Issue #244 - Changing the rootMargin offset to -48px top/bottom. #245

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

zipymonkey
Copy link
Collaborator

The default offset for the scrollspy feature is "0 0 -25%". I think the percentage value doesn't work well with the really long and really short content sections. Changing this to fixed value (-48px) seems to help.

@zipymonkey zipymonkey requested a review from a team as a code owner February 12, 2025 14:09
@zipymonkey zipymonkey linked an issue Feb 12, 2025 that may be closed by this pull request
@zipymonkey
Copy link
Collaborator Author

I also add clean_class to ids just in case.

@cjwetherington cjwetherington self-assigned this Feb 12, 2025
@zipymonkey zipymonkey merged commit d39c005 into main Feb 12, 2025
@zipymonkey zipymonkey deleted the 244-scrollspy-is-not-always-working branch February 12, 2025 18:16
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.

Scrollspy is not always working
2 participants