diff --git a/freepost/static/css/freepost.css b/freepost/static/css/freepost.css index b4e8428..d728ff2 100644 --- a/freepost/static/css/freepost.css +++ b/freepost/static/css/freepost.css @@ -241,6 +241,13 @@ pre { white-space: -o-pre-wrap; } +@media (prefers-color-scheme: dark) { + pre { + background-color: #000; + color: #fff; + } +} + /* Monospace
 to write some nice ASCII art in frontpage */
 pre.new_year {
     background-color:    transparent;
@@ -272,6 +279,13 @@ pre.new_year {
         white-space:        -o-pre-wrap;
 }
 
+@media (prefers-color-scheme: dark) {
+    :not(pre) > code {
+        background-color: #000;
+        color: #fff;
+    }
+}
+
 /* A 
that respects \n without converting to
*/ div.pre { white-space: pre; @@ -729,6 +743,12 @@ a.logo:visited { font-size: 1.5em; } + @media (prefers-color-scheme: dark) { + .container > .content > .post > .title { + color: #fff; + } + } + /* Info below post title */ .container > .content > .post > .info { margin: 1em 0; @@ -744,6 +764,12 @@ a.logo:visited { word-wrap: break-word; } + @media (prefers-color-scheme: dark) { + .container > .content > .post > .text { + color: #fff; + } + } + /* The "new comment" form for this post page */ .container > .content > .post .new_comment > input[type=submit] { margin: 1em 0;