From 2beceee0ee5ba34fad09db7ab91c80b6a0d988a4 Mon Sep 17 00:00:00 2001 From: Dave Welsch Date: Wed, 22 Jan 2025 10:08:02 -0800 Subject: [PATCH] Change background to make code listing more legible in dark mode. Signed-off-by: Dave Welsch --- Docs/_static/aimet-furo.css | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Docs/_static/aimet-furo.css b/Docs/_static/aimet-furo.css index 0df7b176d2b..d266ee33c5e 100644 --- a/Docs/_static/aimet-furo.css +++ b/Docs/_static/aimet-furo.css @@ -9,6 +9,7 @@ --aimet-menu-hover: #e3efff; --aimet-menu-font-active: #0058ff; --aimet-code-grey: #fafafa; + --aimet-code-grey-dark: #535353; --aimet-light-blue: #e7f2fa; } @@ -50,10 +51,17 @@ li.toctree-l2 [for^="toctree-checkbox-"] { max-height: 25em; } -*.highlight pre, pre.literal-block { +/* Change the code backgorund in light and default mode */ +:not(body[data-theme="dark"]) *.highlight pre, :not(body[data-theme="dark"]) pre.literal-block { background-color: var(--aimet-code-grey); } +/* Change the code backgorund in dark mode */ +body[data-theme="dark"] *.highlight pre, body[data-theme="dark"] pre.literal-block { + background-color: var(--aimet-code-grey-dark); +} + + /* * Glossary formatting */