]> xn--ix-yja.es Git - alex.git/commitdiff
Use color-scheme instead of specifying colors
authoralex <alex@pdp7.net>
Sat, 15 Mar 2025 14:56:44 +0000 (15:56 +0100)
committeralexpdp7 <alex@corcoles.net>
Sat, 15 Mar 2025 14:57:32 +0000 (15:57 +0100)
blog/src/blog/html.py

index 7ab411783bd20a485297d2135c907a7fbeb82753..c51237ce3bcc66ba336e89d55334afb2a33058a9 100644 (file)
@@ -47,20 +47,15 @@ def html_template(*content, page_title=None, path, full):
                     ),
                     h.STYLE(
                         textwrap.dedent("""
+                        :root {
+                            color-scheme: light dark;
+                        }
                         body {
                             max-width: 40em;
                             margin-left: auto;
                             margin-right: auto;
                             padding-left: 2em;
                             padding-right: 2em;
-                            background-color: #fffffa;
-                            color: #000000;
-                        }
-                        @media (prefers-color-scheme: dark) {
-                            body {
-                                background-color: #000000;
-                                color: #fffffa;
-                            }
                         }
                         p, blockquote, li {
                             /* from Mozilla reader mode */