From 37e0566745aaae63b538200ee5e5e0e1a5d8faac Mon Sep 17 00:00:00 2001 From: Cody Glassman Date: Wed, 18 Jun 2025 17:43:31 -0700 Subject: [PATCH] docs - upgrade theme --- .readthedocs.yaml | 2 +- docs/requirements.txt | 2 +- docs/source/_static/luadoc.css | 20 ++++++++++++++++---- docs/source/_static/theme-override.css | 6 ++++-- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 962b34f516..926dd3dbf6 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,4 +10,4 @@ python: build: os: ubuntu-22.04 tools: - python: "3.8" + python: "3.9" diff --git a/docs/requirements.txt b/docs/requirements.txt index a193a5f96c..c044a3a21d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,4 +3,4 @@ sphinx==7.1.2 docutils==0.18.1 jinja2==3.1.6 sphinx-design==0.5.0 -sphinxawesome-theme==5.3.2 \ No newline at end of file +git+https://github.com/glassmancody/sphinxawesome-theme.git@fix_dark_theme_pygment_and_flash \ No newline at end of file diff --git a/docs/source/_static/luadoc.css b/docs/source/_static/luadoc.css index 92fb924dfa..027aeefca1 100644 --- a/docs/source/_static/luadoc.css +++ b/docs/source/_static/luadoc.css @@ -17,16 +17,28 @@ padding: 0px; } -html.dark #luadoc pre.example, -html.dark #luadoc pre.example code { - background-color: hsl(var(--muted)); - color: #ffffff; +@media (prefers-color-scheme: dark) { + #luadoc pre.example, + #luadoc pre.example code { + background-color: hsl(var(--muted)); + color: #ffffff; + } } #luadoc code { background-color: unset; } +#luadoc pre { + background-color: inherit; + color: inherit; + border: none; +} + +#luadoc pre code { + white-space: normal; +} + #content #luadoc code a:not(.toc-backref) { font-weight: 600; } diff --git a/docs/source/_static/theme-override.css b/docs/source/_static/theme-override.css index 24b5c0273a..6d61867015 100644 --- a/docs/source/_static/theme-override.css +++ b/docs/source/_static/theme-override.css @@ -4,8 +4,10 @@ } /* Less aggressive dark background */ -.dark { - --background: 220 20% 7% !important; +@media (prefers-color-scheme: dark) { + :root { + --background: 220 20% 7% !important; + } } /* Hide text underline in tables since the underlines clash with table lines */