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

right sidebar's in-page TOC misbehaving #389

Closed
drammock opened this issue Apr 15, 2021 · 7 comments
Closed

right sidebar's in-page TOC misbehaving #389

drammock opened this issue Apr 15, 2021 · 7 comments

Comments

@drammock
Copy link
Collaborator

drammock commented Apr 15, 2021

Something very strange is going on with the in-page TOC links in the right sidebar. Clicking on them doesn't reliably highlight the heading that was clicked on, and whitespace (presumably margin or padding) is getting added to the heading that is clicked on. Screencast below reflects current master as of 886e002

0001-0250.mp4
@drammock drammock changed the title somethi right sidebar's in-page TOC misbehaving Apr 15, 2021
@drammock
Copy link
Collaborator Author

as @jorisvandenbossche pointed out (mne-tools/mne-python#9288 (comment)) the weird spacing is an interaction between pydata-sphinx-theme CSS and sphinx-gallery CSS. However, this reveals that there are 2 separate problems: the other one is that scrollspy doesn't work for the right-column TOC if the section heading is too close to the bottom of the page. I.e., if the final page section is fairly short, then on a tall window clicking on its TOC link will not highlight, but on a short window its TOC link will highlight.

@jorisvandenbossche
Copy link
Member

So for the sphinx gallery issue, I am not fully sure what the purpose is of that CSS snippet. It was added in sphinx-gallery/sphinx-gallery#362, and seems to be related to the fact that there is a note box above the main title. But then it might be a bug in sphinx gallery that the CSS selector doesn't only catch that specific target for the main header of the page, but for any target on that page.

@jorisvandenbossche
Copy link
Member

Also opened an issue on the sphinx-gallery side: sphinx-gallery/sphinx-gallery#815

@choldgraf
Copy link
Collaborator

What's the status on this one? Is there a next step or something to investigate in the pydata theme?

@drammock
Copy link
Collaborator Author

drammock commented May 9, 2021

scrollspy doesn't work for the right-column TOC if the section heading is too close to the bottom of the page. I.e., if the final page section is fairly short, then on a tall window clicking on its TOC link will not highlight, but on a short window its TOC link will highlight.

I think this is still unresolved, but I haven't had time to investigate a fix due to grant deadlines.

@12rambau
Copy link
Collaborator

The scrollspy has been updated here #657 is it solving this issue ?

@choldgraf
Copy link
Collaborator

ah yes this should be solved!

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

No branches or pull requests

4 participants