fix(vscode): improve review comment icon contrast (#10130)

This commit is contained in:
Marius
2026-05-11 10:13:36 +02:00
committed by GitHub
parent 2d37f83daa
commit 5482cc0d09
3 changed files with 10 additions and 7 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"kilo-code": patch
"@kilocode/kilo-ui": patch
---
Improve review comment plus icon contrast in diff viewers.
+2 -5
View File
@@ -256,10 +256,7 @@ export function Diff<T>(props: DiffProps<T>) {
host.removeAttribute("data-color-scheme")
}
// Patch a bug in @pierre/diffs where `grid-template-columns: 100% auto` is set
// for `line-info-basic` separators under `@media (pointer: fine)`, causing the
// expand button to consume 100% of the gutter width and overlap the separator
// content text. We inject into `@layer unsafe` which overrides `@layer base`.
// Patch Pierre shadow styles for Kilo-specific layout and contrast tweaks.
let separatorPatchSheet: CSSStyleSheet | null = null
const patchSeparatorLayout = () => {
const root = getRoot()
@@ -267,7 +264,7 @@ export function Diff<T>(props: DiffProps<T>) {
if (!separatorPatchSheet) {
separatorPatchSheet = new CSSStyleSheet()
separatorPatchSheet.replaceSync(
`@layer unsafe { @media (pointer: fine) { [data-separator='line-info-basic'][data-expand-index] [data-separator-wrapper] { grid-template-columns: 34px auto; } } }`,
`@layer unsafe { @media (pointer: fine) { [data-separator='line-info-basic'][data-expand-index] [data-separator-wrapper] { grid-template-columns: 34px auto; } } [data-utility-button] { background-color: var(--vscode-button-background, var(--button-primary-base, var(--icon-interactive-base))); color: var(--vscode-button-foreground, var(--icon-invert-base, #fff)); } }`,
)
}
if (!root.adoptedStyleSheets.includes(separatorPatchSheet))
@@ -1991,8 +1991,8 @@ body.am-wt-dragging-active * {
.am-markdown-comment-button:hover,
.am-markdown-comment-button:focus-visible {
color: var(--text-base);
background: var(--surface-interactive-base);
color: var(--vscode-button-foreground, var(--icon-invert-base, #fff));
background: var(--vscode-button-background, var(--button-primary-base, var(--icon-interactive-base)));
}
.am-markdown-line-number {