Rework sidebar v2 light palette: zinc rail, white cards with hairline rings
The previous light pass set the rail to near-white (oklch 0.992) with pure white borderless cards on top, so the surface hierarchy collapsed. Drop the rail to a light zinc (oklch 0.972) and lift every card/control off it as a white object with a hairline ring: resting cards get a faint ring + shadow, quiet (receded) cards go 70% white, hover deepens the ring, and the active row becomes a crisp white pill (ring-black/13 + shadow). Selected rows use a solid neutral tint. Scoped project chips get the same lifted-pill treatment while unscoped chips stay quiet outlines. Dark mode keeps the original graphite fills unchanged (verified against pre-change computed styles). Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
4a5bc937d8
commit
a419786679
2 files changed
+27
-24
No files matched your search
@@ -324,7 +324,7 @@ const SidebarV2Row = memo(function SidebarV2Row(props: {
|
||||
const rowClassName = cn(
|
||||
"group/v2-row relative w-full cursor-pointer select-none rounded-md text-left",
|
||||
props.isActive
|
||||
? "bg-background text-foreground shadow-xs/5 ring-1 ring-inset ring-border dark:bg-white/[0.11] dark:shadow-none dark:ring-0"
|
||||
? "bg-background text-foreground shadow-xs ring-1 ring-inset ring-black/[0.13] dark:bg-white/[0.11] dark:shadow-none dark:ring-0"
|
||||
: isSelected
|
||||
? "bg-muted text-foreground dark:bg-white/[0.07]"
|
||||
: "hover:bg-accent/65",
|
||||
@@ -479,17 +479,18 @@ const SidebarV2Row = memo(function SidebarV2Row(props: {
|
||||
tabIndex={0}
|
||||
data-testid="sidebar-v2-row-card"
|
||||
className={cn(
|
||||
// Light cards sit just above the zinc rail instead of tinting it
|
||||
// darker. Active/selected rows then add only a restrained neutral
|
||||
// fill. Dark mode keeps the original graphite treatments.
|
||||
// Light cards are white objects lifted off the zinc rail: hairline
|
||||
// rings carry the resting/active hierarchy (hover deepens the ring,
|
||||
// active deepens it further and adds a shadow). Dark mode keeps the
|
||||
// original graphite fills where rings would glow too hard.
|
||||
"group/v2-row relative w-full cursor-pointer select-none overflow-hidden rounded-lg text-left transition-colors",
|
||||
props.isActive
|
||||
? "bg-background text-foreground shadow-xs/5 ring-1 ring-inset ring-border dark:bg-white/[0.11] dark:shadow-none dark:ring-0"
|
||||
? "bg-background text-foreground shadow-xs ring-1 ring-inset ring-black/[0.13] dark:bg-white/[0.11] dark:shadow-none dark:ring-0"
|
||||
: isSelected
|
||||
? "bg-muted text-foreground dark:bg-white/[0.07]"
|
||||
? "bg-muted text-foreground ring-1 ring-inset ring-black/[0.05] dark:bg-white/[0.07] dark:ring-0"
|
||||
: shouldRecede
|
||||
? "bg-background/50 hover:bg-accent/45 dark:bg-white/[0.025]"
|
||||
: "bg-background hover:bg-accent/65 dark:bg-white/[0.035]",
|
||||
? "bg-background/70 ring-1 ring-inset ring-black/[0.045] hover:bg-background hover:ring-black/[0.08] dark:bg-white/[0.025] dark:ring-0 dark:hover:bg-accent/45"
|
||||
: "bg-background shadow-xs/5 ring-1 ring-inset ring-black/[0.06] hover:ring-black/[0.11] dark:bg-white/[0.035] dark:shadow-none dark:ring-0 dark:hover:bg-accent/65",
|
||||
)}
|
||||
onClick={handleClick}
|
||||
onDoubleClick={handleDoubleClick}
|
||||
@@ -1471,8 +1472,8 @@ export default function SidebarV2() {
|
||||
className={cn(
|
||||
"shrink-0 rounded-md border px-2.5 py-1 text-[11px] font-medium transition-colors",
|
||||
projectScopeKey === null
|
||||
? "border-foreground/15 bg-accent text-foreground"
|
||||
: "border-border bg-background/60 text-muted-foreground hover:border-input hover:bg-background hover:text-foreground dark:border-white/15 dark:bg-transparent dark:hover:border-white/40 dark:hover:bg-transparent",
|
||||
? "border-foreground/20 bg-background text-foreground shadow-xs/5 dark:border-foreground/15 dark:bg-accent dark:shadow-none"
|
||||
: "border-border bg-transparent text-muted-foreground hover:border-input hover:bg-background hover:text-foreground dark:border-white/15 dark:hover:border-white/40 dark:hover:bg-transparent",
|
||||
)}
|
||||
>
|
||||
All
|
||||
@@ -1491,8 +1492,8 @@ export default function SidebarV2() {
|
||||
className={cn(
|
||||
"flex shrink-0 items-center gap-1.5 rounded-md border py-1 pl-1.5 pr-2.5 text-[11px] font-medium transition-colors",
|
||||
isScoped
|
||||
? "border-foreground/15 bg-accent text-foreground"
|
||||
: "border-border bg-background/60 text-muted-foreground hover:border-input hover:bg-background hover:text-foreground dark:border-white/15 dark:bg-transparent dark:hover:border-white/40 dark:hover:bg-transparent",
|
||||
? "border-foreground/20 bg-background text-foreground shadow-xs/5 dark:border-foreground/15 dark:bg-accent dark:shadow-none"
|
||||
: "border-border bg-transparent text-muted-foreground hover:border-input hover:bg-background hover:text-foreground dark:border-white/15 dark:hover:border-white/40 dark:hover:bg-transparent",
|
||||
)}
|
||||
>
|
||||
<ProjectFavicon
|
||||
|
||||
+14
-12
@@ -469,21 +469,23 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
|
||||
}
|
||||
|
||||
/* Give the navigation rail its own surface instead of borrowing the workspace
|
||||
card color. Light mode uses an airy three-surface hierarchy: a zinc-25 rail,
|
||||
white controls and thread cards, then a restrained neutral tint for hover
|
||||
and selection. The scoped semantic tokens keep sidebar v2's palette from
|
||||
changing v1 or the settings nav. */
|
||||
card color. Light mode is a three-surface hierarchy: a light zinc rail
|
||||
(--card), white cards and controls lifted off it (--background), and
|
||||
restrained neutral tints for hover/selection. The rail must sit far enough
|
||||
below white that cards read as objects without heavy borders. The scoped
|
||||
semantic tokens keep sidebar v2's palette from changing v1 or the settings
|
||||
nav. */
|
||||
.app-sidebar {
|
||||
--background: oklch(1 0 0);
|
||||
--foreground: oklch(0.23 0 0);
|
||||
--card: oklch(0.992 0 0);
|
||||
--foreground: oklch(0.25 0.008 265);
|
||||
--card: oklch(0.972 0.003 265);
|
||||
--card-foreground: var(--foreground);
|
||||
--accent: oklch(0.975 0 0);
|
||||
--accent-foreground: oklch(0.2 0 0);
|
||||
--muted: oklch(0.985 0 0);
|
||||
--muted-foreground: oklch(0.45 0 0);
|
||||
--border: oklch(0.9 0 0 / 70%);
|
||||
--input: oklch(0.84 0 0 / 70%);
|
||||
--accent: oklch(0.938 0.005 265);
|
||||
--accent-foreground: oklch(0.2 0.008 265);
|
||||
--muted: oklch(0.936 0.005 265);
|
||||
--muted-foreground: oklch(0.46 0.012 265);
|
||||
--border: oklch(0 0 0 / 10%);
|
||||
--input: oklch(0 0 0 / 16%);
|
||||
--sidebar-stage-fade: var(--card);
|
||||
background-color: var(--card);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user