Skip to content

Commit ab91f0d

Browse files
hongyi-chenoz-agent
andcommitted
fix(header): switch active topic nav from blue accent to grayscale
The active topic tab in the docs header (e.g. "Terminal") rendered with pale blue text and a 2px pale blue underline because both pulled from `--sl-color-text-accent`. Per Warp brand guidelines flagged in internal review, the top nav should match the sidebar's neutral grayscale active treatment instead. Switch the `a[aria-current='page']` text color and the 2px underline indicator to `--sl-color-white`. That token is theme-aware (off-white in dark, near-black in light) and is the same color used by the sidebar's selected row in `warp-components.css` §1, so the two navigation surfaces now share one grayscale "selected" visual language. Comments above each rule are updated to reflect the new design intent. The Scalar-style underline anchor (replacing the header hairline under the active tab) is preserved; only the color changes. Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 77c9758 commit ab91f0d

1 file changed

Lines changed: 21 additions & 17 deletions

File tree

src/components/WarpTopicNav.astro

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
// inside the visible glyph range — geometric centering then equals
2121
// optical centering, no per-icon transform needed (Vercel/Stripe nav
2222
// pattern).
23-
// - Active link: accent-blue text + weight 600 + 2px accent underline
24-
// anchored to the header's bottom edge so the line visually replaces the
25-
// header hairline under the active item (Scalar pattern). Text and
26-
// underline share `--sl-color-text-accent`, which auto-adapts to dark
27-
// and light themes.
23+
// - Active link: full-emphasis white text + weight 600 + 2px white
24+
// underline anchored to the header's bottom edge so the line visually
25+
// replaces the header hairline under the active item (Scalar pattern).
26+
// Both pull from `--sl-color-white`, the brightest neutral text token —
27+
// off-white in dark, near-black in light — so the active topic shares
28+
// one grayscale visual language with the sidebar's active row
29+
// (`warp-components.css` §1) per Warp brand guidelines.
2830
// - No surrounding chip / box / bg — just type + icon
2931
import { Icon } from '@astrojs/starlight/components';
3032
@@ -179,19 +181,19 @@ const CUSTOM_TOPIC_ICONS: Record<string, true> = {
179181
border-radius: var(--sl-radius-xs);
180182
}
181183

182-
/* Active link picks up the same accent blue as the underline so the
183-
text and indicator read as one unified active state, and it ties
184-
into the rest of the site's blue accents (links, callouts, focus
185-
ring). `--sl-color-text-accent` is theme-aware: a lighter blue in
186-
dark mode, a darker blue in light mode — both keep AA contrast
187-
against the nav background. Weight 600 reinforces it against the
188-
calmer gray-3 idle siblings. */
184+
/* Active link uses the brightest neutral text token + weight 600 so
185+
it reads as obviously selected against the calmer gray-3 idle
186+
siblings without introducing a blue accent. `--sl-color-white` is
187+
theme-aware (off-white in dark, near-black in light) and matches
188+
the active text color used by the sidebar's selected row, so the
189+
two navigation surfaces share one grayscale active treatment per
190+
Warp brand guidelines. */
189191
a[aria-current='page'] {
190-
color: var(--sl-color-text-accent);
192+
color: var(--sl-color-white);
191193
font-weight: 600;
192194
}
193195

194-
/* 2px accent underline that REPLACES the header's 1px bottom hairline
196+
/* 2px neutral underline that REPLACES the header's 1px bottom hairline
195197
under the active topic (Scalar pattern). The outer Starlight
196198
`<header class="header">` owns the hairline
197199
(`border-bottom: 1px solid var(--sl-color-hairline-shade)`) and has
@@ -200,16 +202,18 @@ const CUSTOM_TOPIC_ICONS: Record<string, true> = {
200202
than directly on it. We anchor the indicator at the hairline by
201203
dropping it through the bottom padding (`-var(--sl-nav-pad-y)`) and the
202204
1px border (`-1px`); `height: 2px` then paints across both, leaving the
203-
blue accent as the only line at that position under the active tab.
204-
The remainder of the header keeps its hairline. */
205+
bar as the only line at that position under the active tab. The
206+
remainder of the header keeps its hairline. Color matches the active
207+
link text (`--sl-color-white`) so text and indicator read as one
208+
unified grayscale active state. */
205209
a[aria-current='page']::after {
206210
content: '';
207211
position: absolute;
208212
left: 0;
209213
right: 0;
210214
bottom: calc(-1 * var(--sl-nav-pad-y) - 1px);
211215
height: 2px;
212-
background: var(--sl-color-text-accent);
216+
background: var(--sl-color-white);
213217
}
214218

215219
.warp-topic-nav__icon {

0 commit comments

Comments
 (0)