Skip to content

html repr doesn't work in some sphinx themes #4320

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

Closed
dcherian opened this issue Aug 6, 2020 · 1 comment
Closed

html repr doesn't work in some sphinx themes #4320

dcherian opened this issue Aug 6, 2020 · 1 comment

Comments

@dcherian
Copy link
Contributor

dcherian commented Aug 6, 2020

Downstream issue: xarray-contrib/cf-xarray#57
Example: no reprs displayed in https://cf-xarray.readthedocs.io/en/latest/examples/introduction.html

@benbovy's diagnosis:

It looks like bootstrap 4 (used by sphinx-book-theme) forces all html elements with hidden attributes to be actually hidden (source), so the hack in #4053 does not work here (the result is even worse).
I guess that a workaround would be to add some custom CSS such as .xr-wrap { display: block !important }, assuming that custom CSS is loaded after Bootstrap's CSS. Not ideal, though, it looks like a hack on top of another hack.

@dcherian dcherian changed the title html repr doesn't work in some html themes html repr doesn't work in some sphinx themes Aug 6, 2020
@dcherian
Copy link
Contributor Author

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

1 participant