Skip to content

Commit 5db6cf8

Browse files
honzajavorekclaude
andcommitted
Fix dim illustrations in dark mode
Sphinx puts the image class on the wrapping link too, so the invert filter applied twice and the illustrations came out dark grey. Target only the img, so they match the logo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9ba83c1 commit 5db6cf8

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎docs/_static/custom.css‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
Single-colour illustrations and the logo are drawn black. In dark mode,
33
invert them to light grey (#ccc). Follows both Furo's toggle and, in its
44
"auto" mode, the system setting, the same way Furo switches its own colours.
5+
6+
Sphinx puts the image's class on the wrapping link too, so the selector
7+
must target only the img, or the filter would apply twice.
58
*/
6-
body[data-theme="dark"] .adaptive-image,
9+
body[data-theme="dark"] img.adaptive-image,
710
body[data-theme="dark"] .sidebar-logo {
811
filter: invert(80%);
912
}
1013

1114
@media (prefers-color-scheme: dark) {
12-
body:not([data-theme="light"]) .adaptive-image,
15+
body:not([data-theme="light"]) img.adaptive-image,
1316
body:not([data-theme="light"]) .sidebar-logo {
1417
filter: invert(80%);
1518
}

0 commit comments

Comments
 (0)