sphinx_rtd_dark_mode icon indicating copy to clipboard operation
sphinx_rtd_dark_mode copied to clipboard

Function and class names are black when compiled on readthedocs

Open dwiddo opened this issue 3 years ago • 9 comments

When locally compiled, the names of functions and classes are blue as intended. But when compiled on readthedocs, the colors turn black and are difficult to read.

Screenshot 2022-02-01 100812

dwiddo avatar Feb 01 '22 10:02 dwiddo

I'm having the same issue, but it persists locally and when deploying to gh-pages after the build (via github actions) (via make clean html)

vlandau avatar Mar 02 '22 21:03 vlandau

I have the same issue. It also applies to click CLI apps documented with sphinx-click.

image

For me the local build is already black.

Cielquan avatar May 20 '22 15:05 Cielquan

It may help to mention that I solved this issue by specifying sphinx-rtd-theme==0.5.2, it seems that 1.0.0 is causing the issue.

dwiddo avatar May 20 '22 15:05 dwiddo

Is there some activity regarding this issue? I still have dark class names.

photoniker avatar Oct 28 '22 11:10 photoniker

I have this issue when using the theme along Breathe

sanjacob avatar Nov 27 '23 12:11 sanjacob

Here's what I have come up with as a quick fix:

html[data-theme="dark"].writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name {
	color: var(--dark-text-color);
}

html[data-theme="dark"].writer-html5 .rst-content dd dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name {
	color:inherit;
}

YMMV

sanjacob avatar Dec 08 '23 12:12 sanjacob

The issue is also visible in the docs of this project: https://sphinx-rtd-dark-mode.vercel.app/api.html#filter-object

FreyJo avatar Jul 31 '24 17:07 FreyJo