From 1318875166db9d07b7d908cd393fabd264094e3c Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 22 Nov 2025 20:20:35 +0200 Subject: [PATCH] Fix diff colours in docs --- docs/_static/custom.css | 9 +++++++++ docs/conf.py | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 docs/_static/custom.css diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 00000000..311281f1 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,9 @@ +.highlight .gd { color: #A40000 !important; } +.highlight .gi { color: #116600 !important; } + +@media (prefers-color-scheme: dark) { + body:not([data-theme="light"]) .highlight .gd { color: #FF6B6B !important; } + body:not([data-theme="light"]) .highlight .gi { color: #69DB7C !important; } +} +body[data-theme="dark"] .highlight .gd { color: #FF6B6B !important; } +body[data-theme="dark"] .highlight .gi { color: #69DB7C !important; } diff --git a/docs/conf.py b/docs/conf.py index ae35e7b3..6f4ab95e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -60,6 +60,8 @@ # a list of builtin themes. # html_logo = "_static/logo.svg" +html_static_path = ["_static"] +html_css_files = ["custom.css"] html_theme = "furo" html_theme_options = { "dark_css_variables": {