From bee0f07d2f8f8a561e88b721a185900e99d90c6a Mon Sep 17 00:00:00 2001 From: mwiegand Date: Sun, 17 May 2026 00:03:48 +0200 Subject: [PATCH] fix(editor): drop prism.css to unblock dark-mode rendering Prism's stock theme has code[class*=language-] { color:#000; background:transparent; } at specificity (0,1,1), which beats our .editor-code (0,1,0). Result: the editor's background was transparent and base text was #000, leaving black-on-dark text in dark mode (unreadable). We override every Prism token class we use (.token.comment / .string / .keyword / .number / .operator / .identifier) via theme-aware --color-* tokens defined in both :root and the @media (prefers-color-scheme: dark) block of tokens.css, so prism.css contributes nothing of value. Drop the from _editor_assets.html. Flip the form-contract tests to assert prism.css is NOT in the body so a future accidental re-add is caught. Co-Authored-By: Claude Opus 4.7 (1M context) --- l4d2web/l4d2web/templates/_editor_assets.html | 10 ++++++++-- l4d2web/tests/test_blueprints.py | 8 ++++++-- l4d2web/tests/test_script_overlay_routes.py | 6 ++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/l4d2web/l4d2web/templates/_editor_assets.html b/l4d2web/l4d2web/templates/_editor_assets.html index 068d78e..6f11091 100644 --- a/l4d2web/l4d2web/templates/_editor_assets.html +++ b/l4d2web/l4d2web/templates/_editor_assets.html @@ -1,8 +1,14 @@ {# Editor asset bundle — include on any page that mounts a