From eae691e43e58d5cc7a050aba0507f905ff5fbceb Mon Sep 17 00:00:00 2001 From: qer Date: Tue, 16 Jun 2026 15:39:53 +0800 Subject: [PATCH] fix(kimi-web): calm the diff line colors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added/removed diff lines washed the entire row in green/red (12% tint + fully coloured text), which competed with reading the code. Drop the background to a faint 7% tint plus a left accent bar, color only the +/- sign, and let the code text keep the normal ink color so the content — not the color wash — is what stands out. --- apps/kimi-web/src/components/DiffView.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/kimi-web/src/components/DiffView.vue b/apps/kimi-web/src/components/DiffView.vue index ca9d6fa06..4ea0e417e 100644 --- a/apps/kimi-web/src/components/DiffView.vue +++ b/apps/kimi-web/src/components/DiffView.vue @@ -433,21 +433,23 @@ function onBack(): void { min-width: 0; } -/* Added lines — green tint that adapts to the active theme background. */ +/* Added / removed lines: a faint background plus a left accent bar mark the + change, while the code TEXT keeps the normal ink colour. Washing the whole + line in green/red competed with reading the code itself; the sign (+/-) and + the accent carry the colour so the content stays legible. */ .dl-add { - background: color-mix(in srgb, var(--ok) 12%, var(--bg)); + background: color-mix(in srgb, var(--ok) 7%, var(--bg)); + box-shadow: inset 2px 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } -.dl-add .dl-sign, -.dl-add .dl-text { +.dl-add .dl-sign { color: var(--ok, #0e7a38); } -/* Removed lines — red tint. */ .dl-del { - background: color-mix(in srgb, var(--err) 12%, var(--bg)); + background: color-mix(in srgb, var(--err) 7%, var(--bg)); + box-shadow: inset 2px 0 0 color-mix(in srgb, var(--err) 55%, transparent); } -.dl-del .dl-sign, -.dl-del .dl-text { +.dl-del .dl-sign { color: var(--err, #b91c1c); }