From b0cf4ffae6a3a4f9c7a9fc48dd33ff8ee6f94a04 Mon Sep 17 00:00:00 2001 From: Paul Hennig Date: Sun, 5 Dec 2021 20:53:36 +0100 Subject: [PATCH] please preserve my eyesight and add a dark mode (#244) --- static/css/actix.css | 68 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/static/css/actix.css b/static/css/actix.css index 8e0e2cf..cfb9f15 100644 --- a/static/css/actix.css +++ b/static/css/actix.css @@ -689,3 +689,71 @@ h5:hover a { margin-right: auto; margin-top: 1rem; } + + + + +@media (prefers-color-scheme: dark) { + html body { + background: #111; + color:white; +} + +div.actix-showcase { + background-color: #333; +} + +a.nav-link,li.active * { + color:cornflowerblue !important; +} +a:hover{ + color: cornflowerblue; + opacity: 0.8; + +} +pre,p code { + background: #222; + color:white; +} + +a.navbar-brand img { + filter:invert(1) brightness(2) +} + + + +li.active { + background: #222 !important; +} + +/* +you can strip out these by just choosing another code theme that is dark mode compatible +*/ +span.s { + color: green !important; +} + +span.k,span.kd { + color:violet !important; +} + +span.sd,span.cp { + color: #888 !important; +} + +span.kt,span.mi { + color:red !important; +} + +span.nf{ + color:dodgerblue !important; +} + +span.nc,span.nb { + color:gold !important; +} + + +} + +