-
Notifications
You must be signed in to change notification settings - Fork 32
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
toc.follow not respected: right sidebar does not scroll or show "passed" items #380
Comments
It looks like you're using firefox in the picture. Is this behavior also observed in chrome? |
Yes, it's exactly the same on chrome. Also, I do see the effect in the deployed documentation for sphinx-immaterial, which is why I was expecting this to work at all. |
Can you point me to the page in our docs? I haven't seen this behavior. I tried quickly reproducing this locally but was unsuccessful. |
Oh I mean in your docs it works correctly in my browser 😄 See, for example, here: https://sphinx-immaterial.readthedocs.io/en/latest/admonitions.html I am happy to help debug and submit a PR. I know this is coming in some way from mkdocs-material and if you can point me to the entry point for this functionality I might be able to take a look. Inspecting the code, I see that your pages are rendered with each item in the sidebar with class |
Does adding |
Unfortunately no, same behavior. |
Hmm, IIRC the current implementation for the |
Oh wow, I found it. It's the palette: if it's not set, the scrollbar does not appear and the names are not highlighted accordingly. Would it be ok if I checked to see if having a default palette be applied (when it is unset) would solve the issue? |
Yes that sounds good, thanks. |
I looked for upstream issues that might be related. It might be worth adding a default value for the sphinx-immaterial/sphinx_immaterial/__init__.py Lines 29 to 41 in 3c8fe16
The only disadvantage I can think of is our copying of the minified CSS specifically for the color palette. If no sphinx-immaterial/sphinx_immaterial/css_and_javascript_bundles.py Lines 136 to 146 in 3c8fe16
|
The other alternative would be to add a note to the documentation about this behavior. |
The doc option would be easier. A PR is welcome. |
With a vanilla set up of this theme, the
toc.follow
feature seems to not be respected. The right sidebar does not scroll when the page has a large number of items, and there is no difference between items that have "passed", active items and items further down in the page.I am probably doing something wrong, but can't detect what it is from the docs.
Here's how that looks:
And here's the source code: https://github.com/melissawm/minimalsphinx
Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: