From 8017802f3451194a96a633665ed613e8604c0e86 Mon Sep 17 00:00:00 2001 From: Evanroby <107794516+Evanroby@users.noreply.github.com> Date: Sun, 5 Apr 2026 00:21:10 +0200 Subject: [PATCH 1/4] [Docs]: Add support for dark theme. --- docs/_static/custom.css | 183 ++++++++++++++++++++++++++++++++++++++++ docs/conf.py | 3 +- 2 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 docs/_static/custom.css diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 00000000000..60011344ae7 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,183 @@ +@media (prefers-color-scheme: dark) { + body, + .wy-body-for-nav, + .wy-nav-content-wrap { + background: #1a1a1a; + } + .wy-nav-content { + background: #242424; + color: #d4d4d4; + } + + h1, h2, h3, h4, h5, h6, + .rst-content h1, .rst-content h2, .rst-content h3, + .rst-content h4, .rst-content h5, .rst-content h6 { + color: #e8e8e8; + } + a, a:visited { + color: #7ab4f5; + } + .rst-content .toc-backref, + .rst-content .toc-backref:visited { + color: #e8e8e8 !important; + } + + .wy-menu-vertical a, + .wy-menu-vertical a:visited, + .wy-menu-vertical li.toctree-l2 a, + .wy-menu-vertical li.toctree-l3 a, + .wy-menu-vertical li.toctree-l4 a { + color: #d9d9d9; + } + .wy-menu-vertical li.on a, + .wy-menu-vertical li.on a:visited { + color: #e8e8e8; + } + .wy-menu-vertical li.current > a, + .wy-menu-vertical li.current > a:visited { + background: #383838 !important; + color: #e8e8e8 !important; + } + .wy-menu-vertical li.current a { + color: #d9d9d9 !important; + border-right-color: #444 !important; + } + .wy-menu-vertical li.current ul, + .wy-menu-vertical li.toctree-l2.current ul, + .wy-menu-vertical .subnav { + background: #2a2a2a; + } + .wy-menu-vertical li.toctree-l1.current { + background: #2a2a2a !important; + } + .wy-menu-vertical li.toctree-l2.current > a, + .wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a, + .wy-menu-vertical li.toctree-l3.current > a, + .wy-menu-vertical li.toctree-l3.current li.toctree-l4 > a { + background: #2a2a2a !important; + color: #d9d9d9 !important; + } + .wy-menu-vertical li.toctree-l2.current > a:hover, + .wy-menu-vertical li.toctree-l3.current > a:hover, + .wy-menu-vertical li.toctree-l2 a:hover, + .wy-menu-vertical li.toctree-l3 a:hover { + background: #333 !important; + color: #fff !important; + } + + .rst-content code.literal, + .rst-content tt.literal, + code { + background: #2e2e2e; + border-color: #444 !important; + color: #e06c75 !important; + } + .rst-content a code, + .rst-content a tt, + .rst-content code.xref, + .rst-content tt.xref, + a .rst-content code, + a .rst-content tt { + background: #2e2e2e; + color: #e06c75 !important; + } + .highlight, .highlight pre, div[class^="highlight"] { + background: #272822 !important; + border-color: #444; + } + .highlight * { + background: transparent !important; + } + body .rst-content .highlight a, + body .rst-content .highlight a:visited, + body .rst-content .highlight a:link { + color: #7ab4f5 !important; + text-decoration: none !important; + } + .highlight .k, .highlight .kd, .highlight .kn, + .highlight .kp, .highlight .kr, .highlight .kt { color: #82aaff; } + .highlight .nn { color: #7ab4f5; font-weight: normal; } + .highlight .fm { color: #a6e22e; font-weight: normal; } + .highlight .nv { color: #44b0db; font-weight: normal; } + .highlight .na { color: #a6e22e; } + .highlight .nb { color: #f8f8f2; } + .highlight .nc { color: #a6e22e; } + .highlight .nf { color: #a6e22e; } + .highlight .nd { color: #a6e22e; } + .highlight .ni { color: #f8f8f2; } + .highlight .s, .highlight .s1, .highlight .s2, + .highlight .sa, .highlight .sb, .highlight .sc { color: #e6db74; } + .highlight .mi, .highlight .mf { color: #ae81ff; } + .highlight .c, .highlight .c1, .highlight .cm { color: #75715e; } + .highlight .no { color: #d32626; } + .highlight .p { color: #f8f8f2; } + .highlight .bp { color: #f8f8f2; } + + .rst-content table.docutils td, + .rst-content table.docutils th { + background: #2e2e2e; + border-color: #444; + color: #d4d4d4; + } + .rst-content table.docutils th { + background: #383838; + } + .rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td, + .wy-table-backed, + .wy-table-odd td, + .wy-table-striped tr:nth-child(2n-1) td { + background: transparent !important; + } + + .admonition:not(.tip):not(.hint):not(.important), + .admonition:not(.tip):not(.hint):not(.important) p { + background: #2e2e2e; + color: #d4d4d4; + } + .admonition:not(.tip):not(.hint):not(.important) .admonition-title { + background: #383838; + color: #e8e8e8; + } + .admonition.warning { border-left-color: #e5c07b; } + .admonition.note { border-left-color: #61afef; } + .admonition.danger { border-left-color: #e06c75; } + .admonition.tip, + .admonition.hint, + .admonition.important, + .admonition.tip p, + .admonition.hint p, + .admonition.important p { + color: #222; + } + .admonition.tip .highlight, + .admonition.tip .highlight pre, + .admonition.hint .highlight, + .admonition.hint .highlight pre, + .admonition.important .highlight, + .admonition.important .highlight pre { + background: #1a1a1a !important; + border-color: #555 !important; + } + .admonition.tip .highlight *, + .admonition.hint .highlight *, + .admonition.important .highlight * { + background: transparent !important; + color: #f8f8f2 !important; + } + + .rst-content dl:not(.docutils) dt { + border-color: #61afef; + color: #e8e8e8; + } + + .wy-breadcrumbs li.wy-breadcrumbs-aside a, + footer, .rst-footer-buttons a { + color: #7ab4f5; + } + + input[type="text"] { + background: #2e2e2e; + color: #d4d4d4; + border-color: #555; + } +} diff --git a/docs/conf.py b/docs/conf.py index a0d9b6a7d50..996393c5b90 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -148,7 +148,8 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['_static'] +html_static_path = ['_static'] +html_css_files = ['custom.css'] # Custom sidebar templates, must be a dictionary that maps document names # to template names. From 489e811ab18ff6d728aec302ff6b6b5654538872 Mon Sep 17 00:00:00 2001 From: Evanroby <107794516+Evanroby@users.noreply.github.com> Date: Sun, 5 Apr 2026 00:30:32 +0200 Subject: [PATCH 2/4] black --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 996393c5b90..7214c62e142 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -148,8 +148,8 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] -html_css_files = ['custom.css'] +html_static_path = ["_static"] +html_css_files = ["custom.css"] # Custom sidebar templates, must be a dictionary that maps document names # to template names. From afa88b0f522b1a8fddfdf6cf88cb3329301e630e Mon Sep 17 00:00:00 2001 From: Evanroby <107794516+Evanroby@users.noreply.github.com> Date: Sun, 5 Apr 2026 00:30:50 +0200 Subject: [PATCH 3/4] ci: add docs/_static to labeler --- .github/labeler.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 9adf0b94d4b..9114b9acd27 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -309,6 +309,7 @@ - docs/conf.py - docs/_ext/**/* - docs/_html/**/* + - docs/_static/**/* - docs/make.bat - docs/Makefile - docs/prolog.txt From 6f0326d8e9c553fbd73e175e99a95f71aed703d4 Mon Sep 17 00:00:00 2001 From: Evanroby <107794516+Evanroby@users.noreply.github.com> Date: Sun, 5 Apr 2026 09:41:01 +0200 Subject: [PATCH 4/4] UI fixes, by eternal's suggestions --- docs/_static/custom.css | 44 +++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 60011344ae7..db45ff3bbf7 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -108,7 +108,6 @@ .highlight .s, .highlight .s1, .highlight .s2, .highlight .sa, .highlight .sb, .highlight .sc { color: #e6db74; } .highlight .mi, .highlight .mf { color: #ae81ff; } - .highlight .c, .highlight .c1, .highlight .cm { color: #75715e; } .highlight .no { color: #d32626; } .highlight .p { color: #f8f8f2; } .highlight .bp { color: #f8f8f2; } @@ -138,16 +137,46 @@ background: #383838; color: #e8e8e8; } - .admonition.warning { border-left-color: #e5c07b; } - .admonition.note { border-left-color: #61afef; } - .admonition.danger { border-left-color: #e06c75; } + .admonition.note { border-left-color: #61afef; } + .admonition.warning, + .admonition.warning p { + background: #2d2200 !important; + } + .admonition.warning .admonition-title { + background: #5a3e00 !important; + color: #ffd966 !important; + } + .admonition.warning { + border-left: 4px solid #ffaa00 !important; + } + .admonition.attention, + .admonition.attention p, + .admonition.danger, + .admonition.danger p { + background: #2a0a0a !important; + } + .admonition.attention .admonition-title, + .admonition.danger .admonition-title { + background: #5a1a1a !important; + color: #ff6b6b !important; + } + .admonition.attention, + .admonition.danger { + border-left: 4px solid #e06c75 !important; + } .admonition.tip, .admonition.hint, .admonition.important, .admonition.tip p, .admonition.hint p, .admonition.important p { - color: #222; + background: #0f3830; + } + .admonition.tip .admonition-title, + .admonition.hint .admonition-title, + .admonition.important .admonition-title { + background: #134a40; + color: #a8cdc7; } .admonition.tip .highlight, .admonition.tip .highlight pre, @@ -155,14 +184,13 @@ .admonition.hint .highlight pre, .admonition.important .highlight, .admonition.important .highlight pre { - background: #1a1a1a !important; - border-color: #555 !important; + background: #0c2820 !important; + border-color: #1e4a42 !important; } .admonition.tip .highlight *, .admonition.hint .highlight *, .admonition.important .highlight * { background: transparent !important; - color: #f8f8f2 !important; } .rst-content dl:not(.docutils) dt {