website: Make the active sidebar item stand out - #3237
Merged
Merged
Conversation
The current page was marked only by a heavier weight on text that is already the foreground colour, so it was hard to find again after scrolling a long article. Give it the sidebar accent fill and a brand bar on its leading edge, and mark it with `aria-current="page"`. Section root links (`/docs`, `/component`, `/shell`) prefix every page in their section, so they were marked active alongside the real page. Only the longest matching link is active now. Closes #3190 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A leading-edge bar is a web template habit, not a desktop convention: it breaks the item's rounded silhouette and adds a competing edge. The active sidebar item keeps the accent fill and heavier weight only. Write the rule into the Design Guides (en, zh-CN, and the vendored skill copy, which also picks up edits it had missed) and into website/DESIGN.md, which no longer reserves `--brand` for an active sidebar indicator. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A 1px transparent border with the fill clipped to the padding box leaves a 2px gap between the hover and active fills of neighbouring items. The padding gives the pixel back, so rows keep their height and alignment. Leave the vendored skill copy of the Design Guides untouched. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
huacnlee
enabled auto-merge (squash)
September 25, 2026 15:14
The selection-marker rule stays in website/DESIGN.md only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This reverts commit ae4e75c.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3190
Summary
The active page in the docs sidebar was marked only by
font-weight: 650on text that is already--foreground, so after scrolling a long page likeEditorit took a moment to find again.--sidebar-accentfill (#e5e5e5light /#262626dark), stronger than the--secondaryhover fill, and keeps the heavier weight. No leading-edge bar.aria-current="page"./docs,/component,/shell) prefix-matched every page in their section, so e.g./docs/getting-startedmarked both "GPUI Kit" and "Getting Started" active. Only the longest matching link is active now.Design rule
Design Guides → Interaction states now states that selected navigation items, list rows and tabs are shown through the item's own surface (fill, foreground, weight), never a leading-edge bar or one-sided border. Added in
website/docs/design-guides.mdandwebsite/zh-CN/docs/design-guides.md.website/DESIGN.mdno longer reserves--brandfor an "active sidebar indicator" and states the fill-only rule.Verification
Dev server + headless Chromium on
/component/editor, light and dark: exactly one.sidebar-item.active, computed backgroundrgb(229,229,229)/rgb(38,38,38). Checked/docs,/docs/getting-started,/component,/zh-CN/component/editorand/shelleach resolve to a single active item.🤖 Generated with Claude Code