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

pydata-sphinx-theme overrides dropdowns :color: option css class #70

Closed
drammock opened this issue Jun 1, 2022 · 2 comments
Closed

Comments

@drammock
Copy link

drammock commented Jun 1, 2022

Describe the bug

context
When I set :color: warning on a dropdown element, it's not getting styled

expectation
I expected it to get the colors associated with classes sd-bg-warning sd-bg-text-warning, which is what shows up on the child dropdown in the "nested dropdowns" example on https://sphinx-design.readthedocs.io/en/pydata-theme/dropdowns.html#dropdowns-in-other-components

bug
But instead the dropdown is grey

problem
This is a problem for people using sphinx-design via pydata-sphinx-theme because the theme defines a more specific selector .bd-content .sd-card .sd-card header, so even though the sd-bg-warning rule is pegged as !important it's not getting applied.

Reproduce the bug

Screenshot_2022-06-01_11-41-07

List your environment

$ mamba list sphinx
jupyter_sphinx            0.3.2           py310hff52083_0    conda-forge
pydata-sphinx-theme       0.8.1                    pypi_0    pypi
sphinx                    4.5.0              pyh6c4a22f_0    conda-forge
sphinx-autobuild          2021.3.14          pyhd8ed1ab_0    conda-forge
sphinx-copybutton         0.5.0                    pypi_0    pypi
sphinx-design             0.1.0              pyhd8ed1ab_0    conda-forge
sphinx-gallery            0.11.0.dev0               dev_0    <develop>
sphinx-sitemap            2.2.0              pyhd8ed1ab_0    conda-forge
sphinx-theme-builder      0.2.0a14           pyhd8ed1ab_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-bibtex      2.4.2              pyhd8ed1ab_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_2    conda-forge
sphinxext-rediraffe       0.2.7              pyhd8ed1ab_0    conda-forge
@chrisjsewell
Copy link
Member

Heya thanks for the report, however, this feels a bit difficult to fix here. Would you be able to open an issue on pydata-sphinx-theme (and link it here), so we can work with them to see if there is a "mutual" fix?

@chrisjsewell chrisjsewell added more info needed and removed bug Something isn't working labels Aug 15, 2022
@chrisjsewell chrisjsewell changed the title dropdowns don't get the styling from :color: option pydata-sphinx-theme overrides dropdowns :color: option css class Aug 15, 2022
@drammock
Copy link
Author

This was actually already fixed (at least for my use case, and I think for the general case) by the combination of pydata/pydata-sphinx-theme#836 and pydata/pydata-sphinx-theme#847. Sorry I didn't circle back to close this at the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants