From dfa98bcfc872512eb0823f8076b9adeaff6678f1 Mon Sep 17 00:00:00 2001 From: Michael Demetriou Date: Tue, 25 Jun 2019 21:56:31 +0300 Subject: [PATCH] WIP: this is a branch that attempts to honor the new dark mode in OS preferences. I will be using it myself and fix things until I find out that this is adequate to merge to develop. --- less/core.less | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/less/core.less b/less/core.less index f4332a9..179536e 100644 --- a/less/core.less +++ b/less/core.less @@ -2,6 +2,7 @@ @secondary: rgb(114, 191, 133); @subheaders: #444; @headerTextColor: black; +@headerTextColorDarkMode: white; @sansFont: 'Open Sans', 'Segoe UI', Tahoma, Arial, sans-serif; @serifFont: Lora, 'Palatino Linotype', 'Book Antiqua', 'New York', 'DejaVu serif', serif; @monoFont: Hack, consolas, Menlo-Regular, Menlo, Monaco, 'ubuntu mono', monospace, monospace; @@ -10,6 +11,10 @@ @proSelectedCol: #71D571; @textLinkColor: rgb(0, 0, 238); +:root { + color-scheme: light dark; +} + body { font-family: @serifFont; font-size-adjust: 0.5; @@ -1511,3 +1516,53 @@ div.row { pre.code-block { overflow-x: auto; } + +@media (prefers-color-scheme: dark) { + body{ + color: #eee; + background: #111; + + .post-title a:link{ + color: #ccc; + } + + &#collection{ + color: #eee; + + pre{ + background: #060606; + } + } + + h1, header h2 { + a { + color: @headerTextColorDarkMode; + &:hover { + color: #cfcfcf; + } + } + } + + #nav#manage ul a, .dropdown-nav ul a, nav#manage ul ul a, nav#manage ul a{ + color: #ccc; + } + + .dropdown-nav ul ul, .dropdown-nav ul li:hover, nav#manage ul ul, nav#manage ul ul li:hover, nav#manage ul li:hover{ + background: #222; + } + + #official-writing h2, #official-writing h3, #official-writing h4, #wrapper h2, #wrapper h3, #wrapper h4{ + color: #ddd; + } + + a { + color: rgb(162, 162, 255); + } + + a:visited{ + color: rgb(201, 138, 253); + } + + } + +} \ No newline at end of file