Skip to content

Commit 127e1c6

Browse files
committed
Fix email template dark mode rendering by forcing light theme
1 parent 918944a commit 127e1c6

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

openwisp_utils/admin_theme/templates/openwisp_utils/email_template.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@
55
<head>
66
<meta charset="UTF-8">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<meta name="color-scheme" content="light only">
9+
<meta name="supported-color-schemes" content="light only">
810
{% block styles %}
911
<style>
12+
:root {
13+
color-scheme: light only;
14+
supported-color-schemes: light only;
15+
}
16+
1017
body {
1118
min-width: 250px;
1219
background: #fff;
@@ -74,6 +81,9 @@
7481

7582
.logo-container {
7683
text-align: center;
84+
background-color: #ffffff;
85+
padding: 8px;
86+
border-radius: 8px;
7787
}
7888

7989
.logo {
@@ -186,6 +196,11 @@
186196
margin: 0.5rem auto 0.875rem auto;
187197
}
188198
}
199+
200+
[data-ogsc] .logo-container,
201+
[data-ogsb] .logo-container {
202+
background-color: #ffffff !important;
203+
}
189204
</style>
190205
{% endblock styles %}
191206
</head>
@@ -237,4 +252,4 @@
237252
{% endblock body %}
238253
</div>
239254
</body>
240-
</html>
255+
</html>

0 commit comments

Comments
 (0)