Skip to content

Commit da5005b

Browse files
fix: theme specific invert options
1 parent 91a4e51 commit da5005b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

_sass/styles.scss

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121

2222
/* Light theme icon filters */
2323
--readthedocs-icon-filter: brightness(0) saturate(100%) invert(48%) sepia(13%) saturate(0%) hue-rotate(180deg) brightness(93%) contrast(90%);
24+
25+
/* Invert options */
26+
--invert-standard: 1;
27+
--invert-hover: 0;
2428
}
2529

2630
[data-bs-theme="dark"] {
@@ -43,6 +47,10 @@
4347

4448
/* Dark theme icon filters */
4549
--readthedocs-icon-filter: brightness(0) saturate(100%) invert(72%) sepia(89%) saturate(455%) hue-rotate(358deg) brightness(103%) contrast(104%);
50+
51+
/* Invert options */
52+
--invert-standard: 0;
53+
--invert-hover: 1;
4654
}
4755

4856
body {
@@ -127,10 +135,10 @@ code {
127135
}
128136

129137
img.invert {
130-
filter: invert(1);
138+
filter: invert(var(--invert-standard));
131139
}
132140
.btn:hover img.invert {
133-
filter: invert(0);
141+
filter: invert(var(--invert-hover));
134142
}
135143

136144
/* code blocks */

0 commit comments

Comments
 (0)