aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByron Torres <[email protected]>2020-11-02 06:15:58 +0000
committerDrew DeVault <[email protected]>2020-11-02 11:44:05 -0500
commit1074d434d2a186b0c60eb275c034c93e3e874e6f (patch)
treedab880738c857e7d8a3016f00c2a0b4a2b5cae6a
parentReduce li margin to 0.5rem (diff)
downloadcapybara-1074d434d2a186b0c60eb275c034c93e3e874e6f.tar.xz
capybara-1074d434d2a186b0c60eb275c034c93e3e874e6f.zip
Add dark mode user preference with CSS media query
-rw-r--r--main.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/main.go b/main.go
index c13356d..1950c3c 100644
--- a/main.go
+++ b/main.go
@@ -286,6 +286,29 @@ dl dt {
dl dt:not(:first-child) {
margin-top: 0.5rem;
}
+
+@media(prefers-color-scheme:dark) {
+ html {
+ background-color: #111;
+ color: #eee;
+ }
+
+ blockquote {
+ background-color: #000;
+ }
+
+ pre {
+ background-color: #222;
+ }
+
+ a {
+ color: #0087BD;
+ }
+
+ a:visited {
+ color: #333399;
+ }
+}
`
type GemtextContext struct {