mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-28 11:05:31 +08:00
fix(vscode): improve review comment icon contrast (#10130)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"kilo-code": patch
|
||||
"@kilocode/kilo-ui": patch
|
||||
---
|
||||
|
||||
Improve review comment plus icon contrast in diff viewers.
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user