fix(sidebar): quiet the host pill outline on the selected workspace card (#38841)

#37294 outlined the host pill on the selected workspace card at 80% of the
sidebar text color, so in dark mode the pill's border outshone its own label
and the branch name. Tint the sidebar foreground 40% into the sidebar
surface instead, the style guide's recipe for a tint from existing tokens.
The outline stays visible on the selected wash (about 2.5:1 dark, 2.3:1
light by default), stays neutral in accent-colored themes, follows each
theme's sidebar colors, and sits below the label's contrast.

Fixes #38641
This commit is contained in:
Neil
2026-11-05 21:48:00 -08:00
committed by GitHub
parent 1038adb786
commit ea421720b9
+7 -2
View File
@@ -1523,10 +1523,15 @@ html.native-shell .app-layout {
box-shadow: 0 1px 2px color-mix(in srgb, var(--worktree-sidebar-foreground) 3%, transparent);
}
/* #15971: the wash matches the pill's fill, so its border carries the shape; 80% keeps >=3:1 wherever the validated foreground is >=4.5:1. */
/* #15971: the wash matches the pill's fill, so its border carries the shape. A neutral sidebar tint
keeps the outline visible but quieter than the pill's label (#38641). */
@scope ([data-worktree-card-surface][data-worktree-card-active='primary']) to ([data-worktree-lineage-children]) {
[data-variant='hostContext'] {
border-color: color-mix(in srgb, var(--worktree-sidebar-foreground) 80%, transparent);
border-color: color-mix(
in srgb,
var(--worktree-sidebar-foreground) 40%,
var(--worktree-sidebar)
);
}
}