fix(kimi-web): calm the diff line colors

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.
This commit is contained in:
qer 2026-06-16 15:39:53 +08:00
parent f5caf4cca7
commit eae691e43e

View file

@ -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);
}