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

Versionchanged, versionadded and deprecated admonitions have unclickable boxes #884

Closed
adeak opened this issue Aug 19, 2022 · 3 comments
Closed

Comments

@adeak
Copy link

adeak commented Aug 19, 2022

Apologies in advance for not having a minimal example, but most of the machinery involved in building a page is above my head.

I noticed in PyVista's documentation that the versionchanged, versionadded and deprecated directives (admonitions) are rendered in boxes whose text can't be individually highlighted, and links therein can't be clicked. For instance the versionchanged admonition here:

Screenshot from 2022-08-19 17-08-26

I see the same behaviour on light and dark theme both, and the issue is confirmed at least on firefox + debian and chrome + macOS.

Digging into the source I've figured out that there's this piece of pydata-sphinx-theme.css (unminified):

div.deprecated>p:before,div.versionadded>p:before,div.versionchanged>p:before{
   content:"";
   width:100%;
   height:100%;
   position:absolute;
   left:0;
   top:0;
   background-color:var(--pst-color-info);
   opacity:.1
}

If I comment out this block the admonition text becomes selectable and the link clickable, and the dim orange highlight disappears. I assume what's going on is that there's an empty something being pulled up in front of the actual text with --pst-color-info colour and 0.1 opacity, and this cover is what's messing with interaction.

For reference, the environment for the doc build uses among other things

Sphinx==4.5.0
jupyter_sphinx==0.4.0
numpydoc==1.4.0
pydata-sphinx-theme==0.9.0
pypandoc==1.8.1
pytest-sphinx==0.4.0
sphinx-autobuild==2021.3.14
sphinx-copybutton==0.5.0
sphinx-gallery==0.11.0
sphinx-notfound-page==0.8.3
sphinx-panels==0.6.0
sphinxcontrib-websupport==1.2.4
@12rambau
Copy link
Collaborator

I think this issue was already covered in this PR: #877.
It will be included in the next release of the theme, but for the sake of verification you can build your doc against our master branch to check if it works

@adeak
Copy link
Author

adeak commented Aug 19, 2022

Awesome, thanks for the quick reply @12rambau. I checked the first two or three pages of issues but I didn't look at PRs :) I'll build on top of your main and check.

@adeak
Copy link
Author

adeak commented Aug 19, 2022

Can confirm that main doesn't have this issue, thanks again.

I also love the updated, more readable code rendering and the new dark theme switching icons!

Screenshot from 2022-08-19 19-14-13

@adeak adeak closed this as completed Aug 19, 2022
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

2 participants