fix(ui): match left sidebar divider opacity with the rest of the UI (#6290)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gatsby74
2026-06-24 20:33:13 -07:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 79d05110ed
commit c5d67a923b
2 changed files with 8 additions and 3 deletions
+3 -1
View File
@@ -234,7 +234,9 @@
--worktree-sidebar-foreground: #fafafa;
--worktree-sidebar-accent: #353535;
--worktree-sidebar-accent-foreground: #fafafa;
--worktree-sidebar-border: rgb(255 255 255 / 0.1);
/* Match --border / --sidebar-border (7%) so the left sidebar's divider lines
aren't brighter than the rest of the UI in dark mode (#5906). */
--worktree-sidebar-border: rgb(255 255 255 / 0.07);
--worktree-sidebar-ring: #737373;
--sidebar: #171717;
--sidebar-foreground: #fafafa;
@@ -53,7 +53,9 @@ function buildSurfaceVariables(args: {
}): LeftSidebarStyleVariables {
const { background, foreground, overrideTextTokens = false } = args
const accent = `color-mix(in srgb, ${foreground} 9%, ${background})`
const border = `color-mix(in srgb, ${foreground} 14%, ${background})`
// 7% keeps the sidebar divider at the same prominence as the global --border
// (7% in dark mode) so it reads like the rest of the UI; 14% rendered brighter (#5906).
const border = `color-mix(in srgb, ${foreground} 7%, ${background})`
const ring = `color-mix(in srgb, ${foreground} 44%, ${background})`
const vars: LeftSidebarStyleVariables = {
'--worktree-sidebar': background,
@@ -81,7 +83,8 @@ function buildSurfaceVariables(args: {
vars['--accent-foreground'] = foreground
vars['--muted'] = `color-mix(in srgb, ${foreground} 7%, ${background})`
vars['--muted-foreground'] = `color-mix(in srgb, ${foreground} 62%, ${background})`
vars['--border'] = `color-mix(in srgb, ${foreground} 14%, ${background})`
// Match the global --border (7%) so sidebar-scoped dividers aren't brighter (#5906).
vars['--border'] = `color-mix(in srgb, ${foreground} 7%, ${background})`
}
return vars
}