From a4f205a62dee8bfa2bb88cfe2cde61bcbc2fe6b5 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Wed, 28 Sep 2022 01:00:12 +0700 Subject: [PATCH] chore: set color scheme dark https://css-tricks.com/a-complete-guide-to-dark-mode-on-the-web/#toggling-themes https://gist.github.com/haunt98/dc84b3d28a660ec8ce03bb100c5100d2 --- docs/styles.css | 2 +- templates/styles.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/styles.css b/docs/styles.css index d0e2d0e..f7d383a 100644 --- a/docs/styles.css +++ b/docs/styles.css @@ -1 +1 @@ -body{font-family:recursive,sans-serif;font-variation-settings:"MONO" 0,"CASL" 1;margin:5% auto;max-width:75%;line-height:1.8;color:#24292f;background:#fff}code{font-family:iosevka web;font-variation-settings:"MONO" 1,"CASL" 1;display:inline-block;background:#f6f8fa}a{color:#0969da}@media(prefers-color-scheme:dark){body{color:#c9d1d9;background:#0d1117}code{background:#161b22}a{color:#58a6ff}} \ No newline at end of file +body{font-family:recursive,sans-serif;font-variation-settings:"MONO" 0,"CASL" 1;margin:5% auto;max-width:75%;line-height:1.8;color:#24292f;background:#fff}code{font-family:iosevka web;font-variation-settings:"MONO" 1,"CASL" 1;display:inline-block;background:#f6f8fa}a{color:#0969da}@media(prefers-color-scheme:dark){:root{color-scheme:dark}body{color:#c9d1d9;background:#0d1117}code{background:#161b22}a{color:#58a6ff}} \ No newline at end of file diff --git a/templates/styles.css b/templates/styles.css index 9626095..b3dbd65 100644 --- a/templates/styles.css +++ b/templates/styles.css @@ -20,6 +20,10 @@ a { } @media (prefers-color-scheme: dark) { + :root { + color-scheme: dark; + } + body { color: #c9d1d9; background: #0d1117;