Skip to content

Global nav: highlight the current page + clipboard icon redraw#471

Merged
bryceerobertson merged 3 commits into
mainfrom
nav-active-state
Jul 23, 2026
Merged

Global nav: highlight the current page + clipboard icon redraw#471
bryceerobertson merged 3 commits into
mainfrom
nav-active-state

Conversation

@bryceerobertson

@bryceerobertson bryceerobertson commented Jul 20, 2026

Copy link
Copy Markdown
Member
  • The global nav now marks the page the user is on: the active pill's existing teal border goes to full-strength --bright-teal-300 with the hover fill made persistent. Set via aria-current="page", so screen readers announce it too.
  • Works in all three nav renders: desktop pills, the +N overflow dropdown, and the mobile menu. When the current page's link is hidden inside the +N dropdown, the +N pill gets the teal ring (ring only, no fill) as a "your page is in here" hint.
  • Hover still reads on an active pill: it lifts with the same color-mix used for card hovers.
  • Non-active pills are untouched — the new CSS only matches links carrying aria-current/data-active-inside. No layout shift (border width unchanged), and the existing --hover-transition animates the ring on route change.
  • clipboard.svg (Volunteer projects) redrawn slightly — portrait board, top clip, three ruled lines, same 1px stroke style as the sibling icons. The old shape could be confused with a briefcase.
  • Ring color note: this PR originally used the green highlight (--bright-green); it has been updated to the teal now that Highlight color back to teal sitewide #474 reverts the site's highlight color to --bright-teal-300.

@melissasamworth Neither the active-state treatment nor the redrawn icon comes from your designs — both need your design sign-off. Easiest place to see them is the Vercel preview: any resource page shows its own pill ringed; /projects or /donation-guide shows the ring on the +N pill; the new clipboard icon is in the +N dropdown next to Volunteer projects.

🤖 Generated with Claude Code

bryceerobertson and others added 2 commits July 19, 2026 19:15
aria-current="page" on the matching link in all three nav renders
(desktop pills, +N overflow dropdown, mobile menu); the +N pill gets a
data-active-inside hint when the current page's link is inside it.
Active pill = full-strength bright-green border + persistent hover
fill; ring only on the +N pill.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Portrait board with a top clip and three ruled lines, same 1px stroke
style as the other nav icons; the old shape read as a briefcase.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-safety-com Ready Ready Preview, Comment Jul 20, 2026 3:36am

Request Review

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
change. aria-current is set in the JSX, one link at a time. */
.nav-item[aria-current='page'],
.nav-dropdown-item[aria-current='page'] {
border-color: var(--bright-teal-300);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think aesthetically the border color looks best the same. What it is on hover.

Image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem is the fill is ~invisible in the dropdown and, on wider screens, the +5 button.

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Okay I guess keep it how it is. Maybe one day I'll want to change it and figure it out but it's cool.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in the change you made is fine.

@bryceerobertson
bryceerobertson merged commit 82ec89c into main Jul 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants