From 00b739243a730b912e6c9fe1563718262ee45a68 Mon Sep 17 00:00:00 2001 From: Paul Toffoloni <69189821+ptoffy@users.noreply.github.com> Date: Tue, 18 Jul 2023 01:20:44 +0200 Subject: [PATCH] Add dark mode code theme (#856) --- docs/stylesheets/syntax.css | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/docs/stylesheets/syntax.css b/docs/stylesheets/syntax.css index eb96267b..2366899e 100644 --- a/docs/stylesheets/syntax.css +++ b/docs/stylesheets/syntax.css @@ -125,3 +125,56 @@ .hljs-ln .hljs-ln-n:before { content: attr(data-line-number); } + +@media (prefers-color-scheme: dark) { + + .md-typeset .hljs { + color: #8194F7; + } + + .hljs-class .hljs-title, + .hljs-type { + color: #a6e3ff; + } + + .hljs-code, + .hljs-string, + .hljs-meta-string { + color: #F9ECFB; + } + + .hljs-function { + color: #F9ECFB; + } + + .hljs-variable, + .hljs-template-variable { + color: #40c4ff; + } + + .hljs-attr { + color: #DF3EFB + } + + .hljs-section { + color: #F9ECFB; + } + + .hljs-meta { + color: #c0764e; + } + + .hljs-subst { + color: #F9ECFB + } + + .hljs-addition { + background-color: transparent; + color: #60e260; + } + + .hljs-deletion { + background-color: transparent; + color: #ff7b72; + } +}