Skip to content

Commit eadb6e1

Browse files
committed
Adjust altcha checkbox styling for dark theme
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 35a45ec commit eadb6e1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

vulnerabilities/templates/admin_login.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@
33

44
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" href="{% static "admin/css/login.css" %}">
55
{{ form.media }}
6+
7+
<style>
8+
/* Altcha theme correction for dark mode */
9+
10+
html[data-theme="dark"] altcha-widget {
11+
--altcha-color-base: #1e1e1e;
12+
--altcha-color-text: #ffffff;
13+
--altcha-color-border: #444;
14+
--altcha-border-radius: 8px;
15+
--altcha-border-width: 2px;
16+
--altcha-color-footer-bg: #2a2a2a;
17+
}
18+
19+
html[data-theme="light"] altcha-widget {
20+
--altcha-color-base: #ffffff;
21+
--altcha-color-text: #000000;
22+
--altcha-color-border: #ccc;
23+
--altcha-border-radius: 8px;
24+
--altcha-color-footer-bg: #f9f9f9;
25+
}
26+
27+
@media (prefers-color-scheme: dark) {
28+
altcha-widget {
29+
--altcha-color-base: #1e1e1e;
30+
--altcha-color-text: #ffffff;
31+
--altcha-color-border: #444;
32+
--altcha-border-radius: 8px;
33+
--altcha-border-width: 2px;
34+
--altcha-color-footer-bg: #2a2a2a;
35+
}
36+
}
37+
</style>
638
{% endblock %}
739

840
{% block bodyclass %}{{ block.super }} login{% endblock %}

0 commit comments

Comments
 (0)