From 1de86f95ac928ba97b36b2f0e9c102bb45a4bbf8 Mon Sep 17 00:00:00 2001 From: Cody Glassman Date: Mon, 16 Jun 2025 16:41:37 -0700 Subject: [PATCH] docs - slightly less ugly dark mode code blocks --- docs/source/_static/luadoc.css | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/source/_static/luadoc.css b/docs/source/_static/luadoc.css index 6050fc8d4c..44e2557d7e 100644 --- a/docs/source/_static/luadoc.css +++ b/docs/source/_static/luadoc.css @@ -17,15 +17,19 @@ padding: 0px; } - -/* EXAMPLE: this should serve as a template on how to conditonally apply styles for dark themes -body[data-theme="dark"] #luadoc pre.example { +@media (prefers-color-scheme: dark) { + body:not([data-theme="light"]) #luadoc pre.example, + body:not([data-theme="light"]) #luadoc pre.example code { + background-color: #2a3a49; + color: #ffffff; + } } -@media (prefers-color-scheme: dark) { - body:not([data-theme="light"]) #luadoc pre.example { - } -} */ +body[data-theme="dark"] #luadoc pre.example, +body[data-theme="dark"] #luadoc pre.example code { + background-color: #2a3a49; + color: #ffffff; +} #luadoc a:not(:link) { font-weight: bold;