From 4a46dc0d3b0b0bd3683fa2f27a5f7839e6453415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=85=E5=87=A4?= Date: Fri, 31 Jul 2026 01:27:07 -0700 Subject: [PATCH 1/2] chore(tokens): drop dead sidebar brand tokens, sync DESIGN.md active state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The purple sidebar indicator/ring was removed in f73cd15 but its tokens (--sidebar-primary/-primary-foreground/-ring, plus their --color-* Tailwind bindings, light + dark) stayed behind with zero component references. DESIGN.md still documented the deleted 2px indicator as the active-state spec — it now describes what the component actually does (sidebar-accent background + font-medium). The Switch half of #5 is already resolved elsewhere (checked state runs on --accent-blue-fill). Closes #5. --- DESIGN.md | 2 +- src/style.css | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index 2fc809c..a2040ac 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -72,7 +72,7 @@ The system employs a **bimodal elevation strategy**: - **Breadcrumb**: Minimalist. 14px icons, 4px-6px gaps. Active page is `text-foreground font-normal`, inactive is `text-muted-foreground`. - **Sidebar**: - Container uses `primary-foreground` background. - - Active items use `accent` background with a 2px `primary` left border indicator. + - Active items use a `sidebar-accent` background and `font-medium` weight (no colored indicator bar or ring). ### Items diff --git a/src/style.css b/src/style.css index d6d0011..2afd4ea 100644 --- a/src/style.css +++ b/src/style.css @@ -1105,12 +1105,9 @@ --chart-5: oklch(0.769 0.188 70.08); --sidebar: var(--background); --sidebar-foreground: oklch(0.21 0.004 95); - --sidebar-primary: oklch(0.55 0.22 290); - --sidebar-primary-foreground: oklch(0.985 0 0); --sidebar-accent: var(--overlay-hover); --sidebar-accent-foreground: oklch(0.21 0.004 95); --sidebar-border: oklch(0.905 0.0045 72); - --sidebar-ring: oklch(0.55 0.22 290); --scrollbar-thumb: oklch(0 0 0 / 0.18); --scrollbar-thumb-hover: oklch(0 0 0 / 0.32); --primary: var(--brand); @@ -1120,8 +1117,6 @@ --brand-soft: oklch(0.96 0.025 290); --brand-border: oklch(0.84 0.08 290); --brand-hover: oklch(0.49 0.23 290); - --sidebar-primary: var(--brand); - --sidebar-ring: var(--brand); /* PRIMARY button ramp (charcoal high-emphasis CTA). rest → hover → press, each step lighter (19 → 51 → 92 lighten). This is the default high-emphasis fill; the scheme brand is reserved for variant="brand". */ @@ -1494,12 +1489,9 @@ --chart-5: oklch(0.645 0.246 16.439); --sidebar: oklch(0.185 0 0); --sidebar-foreground: oklch(0.90 0 0); - --sidebar-primary: oklch(0.62 0.22 290); - --sidebar-primary-foreground: oklch(0.985 0 0); --sidebar-accent: var(--overlay-hover); --sidebar-accent-foreground: oklch(0.86 0 0); --sidebar-border: oklch(1 0 0 / 8%); - --sidebar-ring: oklch(0.62 0.22 290); --scrollbar-thumb: oklch(1 0 0 / 0.14); --scrollbar-thumb-hover: oklch(1 0 0 / 0.26); --primary: var(--brand); @@ -1509,8 +1501,6 @@ --brand-soft: oklch(0.30 0.07 290 / 0.45); --brand-border: oklch(0.72 0.16 290 / 0.35); --brand-hover: oklch(0.78 0.15 290); - --sidebar-primary: var(--brand); - --sidebar-ring: var(--brand); /* Dark mode: the primary CTA inverts to a light fill (text-background gives it dark text automatically), still lightening rest → hover → press. */ --btn-primary: oklch(0.976 0 0); @@ -2021,12 +2011,9 @@ --color-sidebar: var(--sidebar); --color-sidebar-foreground: var(--sidebar-foreground); - --color-sidebar-primary: var(--sidebar-primary); - --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); --color-sidebar-accent: var(--sidebar-accent); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-border: var(--sidebar-border); - --color-sidebar-ring: var(--sidebar-ring); --color-brand: var(--brand); --color-brand-foreground: var(--brand-foreground); --color-brand-soft: var(--brand-soft); From d470cfbb83d5c99156b90432729cd943876548c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=85=E5=87=A4?= Date: Fri, 31 Jul 2026 01:32:20 -0700 Subject: [PATCH 2/2] chore(showcase): drop --sidebar-primary from the brand color catalog Missed consumer: the showcase rendered a swatch for the deleted token. --- showcase/lib/color-catalog.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/showcase/lib/color-catalog.ts b/showcase/lib/color-catalog.ts index a8db967..d14199d 100644 --- a/showcase/lib/color-catalog.ts +++ b/showcase/lib/color-catalog.ts @@ -106,7 +106,7 @@ export const COLOR_SECTIONS: ColorSection[] = [ title: 'Brand', titleZh: '品牌色', families: [ - rowsFamily(['--brand', '--brand-soft', '--brand-border', '--brand-hover', '--sidebar-primary']), + rowsFamily(['--brand', '--brand-soft', '--brand-border', '--brand-hover']), ], }, {