From 597e01ac8236175c90c5b706170c322edc418007 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Sun, 5 Apr 2026 20:51:01 +0200 Subject: [PATCH] fix(web): don't apply Shiki background-color to token spans Only the root .shiki element gets background-color. Token spans only get color/font-style/font-weight/text-decoration. This prevents white blocks showing through the yellow line highlight. Co-Authored-By: Claude Opus 4.6 (1M context) --- webui2/src/components/code/file-viewer.module.css | 1 - webui2/src/index.css | 14 ++++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/webui2/src/components/code/file-viewer.module.css b/webui2/src/components/code/file-viewer.module.css index 4ab9e8eaf05308eb76116cedbc42ab0068a22a63..b3d5ce0372a6b8fa696c6dcaa60113144aba5f5d 100644 --- a/webui2/src/components/code/file-viewer.module.css +++ b/webui2/src/components/code/file-viewer.module.css @@ -37,7 +37,6 @@ opacity: 0.4; user-select: none; cursor: pointer; - background: transparent !important; } .line-number:hover { diff --git a/webui2/src/index.css b/webui2/src/index.css index bad2964cb54d8729db450efbb063d965109ddeeb..0c5e0b2409682689f62f00083afa4115dea14397 100644 --- a/webui2/src/index.css +++ b/webui2/src/index.css @@ -112,19 +112,25 @@ body { } /* ── Shiki dual-theme (defaultColor: false) ──────────────────────────────── */ -.shiki, -.shiki span { +.shiki { color: var(--shiki-light); background-color: var(--shiki-light-bg); +} + +.shiki span { + color: var(--shiki-light); font-style: var(--shiki-light-font-style); font-weight: var(--shiki-light-font-weight); text-decoration: var(--shiki-light-text-decoration); } -.dark .shiki, -.dark .shiki span { +.dark .shiki { color: var(--shiki-dark); background-color: var(--shiki-dark-bg); +} + +.dark .shiki span { + color: var(--shiki-dark); font-style: var(--shiki-dark-font-style); font-weight: var(--shiki-dark-font-weight); text-decoration: var(--shiki-dark-text-decoration);