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

Dark mode: highlighted footnote unreadable #161

Closed
hugovk opened this issue Dec 2, 2023 · 2 comments · Fixed by #162
Closed

Dark mode: highlighted footnote unreadable #161

hugovk opened this issue Dec 2, 2023 · 2 comments · Fixed by #162
Labels

Comments

@hugovk
Copy link
Member

hugovk commented Dec 2, 2023

  1. Go to https://docs.python.org/3.13/library/gettext.html (uses Sphinx 6.2.1)
  2. Switch to dark mode if in light
  3. Click the "[1]" or "[2]" link to jump to the footnote

Expected result: Text is readable

Actual result: Uses a yellow background suitable for light mode, not dark, making text unreadable:

image

This is because of this CSS in https://docs.python.org/3.13/_static/basic.css:

.footnote:target {
    background-color: #ffa;
}

This CSS comes from Sphinx:

https://github.com/sphinx-doc/sphinx/blob/35965903177c6ed9a6afb62ccd33243a746a3fc0/sphinx/themes/basic/static/basic.css_t#L715-L717

But I guess we should fix it in this theme?

Note: Cannot reproduce with https://docs.python.org/3.12/library/gettext.html because it uses Sphinx 4.5.0, and the CSS only applies to the structure in 5+.

@ferdnyc
Copy link

ferdnyc commented Jan 26, 2024

Note: Cannot reproduce with https://docs.python.org/3.12/library/gettext.html because it uses Sphinx 4.5.0, and the CSS only applies to the structure in 5+.

Bummer: Now it can be reproduced there. I guess the site pulled in Sphinx updates, but not updates to the theme!

(Edit: Currently reproduces in the docs for 3.11, 3.12, and 3.13.)

@hugovk
Copy link
Member Author

hugovk commented Jan 26, 2024

It's not releases yet :) #162 (comment)

But thanks for the ping!

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

Successfully merging a pull request may close this issue.

2 participants