From ee68666b0abdf4671f1a9fe3069d3a0ca590a94a Mon Sep 17 00:00:00 2001 From: darnodo Date: Fri, 21 Nov 2025 17:29:34 +0100 Subject: [PATCH] Fix SVG visibility in dark mode Invert SVG colors in dark mode to improve visibility. Also, override OS-level dark mode when the site is in light mode to ensure the correct theme is used. --- assets/css/custom.css | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 assets/css/custom.css diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..999f529 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,23 @@ +/* Fix SVG visibility in dark mode by inverting colors */ +.dark svg { + filter: invert(1) hue-rotate(180deg); +} + +/* Counter-invert images within SVGs to preserve their original colors */ +.dark svg image { + filter: invert(1) hue-rotate(180deg); +} + +/* Fix tech-banner gradient overlays to respect site theme, not OS theme */ +:root { + --color-bg: #ffffff; +} + +.dark { + --color-bg: #111111 !important; +} + +/* Override OS-level dark mode when site is in light mode */ +html:not(.dark) { + --color-bg: #ffffff !important; +}