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

Make the nav sidebar's scroll-to-current-page behaviour less jumpy #1293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jul 8, 2022

  1. Make the nav sidebar's scroll-to-current-page behaviour less jumpy

    This avoids scrolling the sidebar when the link is already in view by
    using "nearest" for the vertical axis ("block") instead of the default
    of "start".  This behaviour is much better when clicking on items in the
    current viewport, especially if the current viewport matches the initial
    viewport.
    
    It's still a little jumpy when the current link isn't visible in the
    initial viewport, because the sidebar position still changes across page
    loads.  But the new behaviour solves the big problem on initial home
    page loads with a long sidebar where the logo and project title would be
    immediately scrolled out of view.
    
    Related to readthedocs#824.
    tsibley committed Jul 8, 2022
    Configuration menu
    Copy the full SHA
    b8535ae View commit details
    Browse the repository at this point in the history