-
Notifications
You must be signed in to change notification settings - Fork 310
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
Coloring the version switcher button does not work as expected #1128
Comments
looking at our own documentation: https://github.com/pydata/pydata-sphinx-theme/blob/main/docs/_static/custom.css it seems the selector should be |
Thanks a lot for your reply. However, I am having issues with the
However, there seems to be an issue with the
If I change this to
the button changes its color to orange. However, as I am using the name "dev", this approach does not work me (especially if I want to color versions with "dev", "stable", and all other versions in different colors). |
I think for me it would be very helpful if I could somehow see the values of |
I check our documentation and it seems the value of these parameters are never changed in the page (they remain set to "" all the time). @choldgraf is it a bug or is it the expected behaviour ? |
I'm not sure - I don't use the version switcher myself so not really sure what the intended behavior is |
I wonder if this is the problem: pydata-sphinx-theme/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js Lines 353 to 356 in 39aa0d7
It looks like the conditional is checking version against the string |
Hi everyone,
I am trying to color the version switcher button of my docs using a .css file, as explained in the documentation (https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html) with the code
In my conf.py file, I use:
where the
switcher_version
evaluates to"dev"
at build-time (I have already checked this with a print statement).For the sake of completeness, my version_switcher.json file is given by
When I don't use the selector, i.e., if I use
or even
then setting the background color works.
Additionally, I was unable to change the text color of the version switcher button with, e.g.,
It seems to me that the name "data-active-version-name" might be wrong. What would be the correct way to set this property?
And why am I unable to change the text color?
Trying the same with the "data-version-name" to color the entries inside the version-switcher__container worked as expected.
I am using Sphinx 5.3.0 with the pydata-sphinx-theme 0.12.0 installed using conda.
Thanks a lot for your help.
The text was updated successfully, but these errors were encountered: