Skip to content

✨ Add light/dark theming support to the mega menu#146

Open
joshbermanssw wants to merge 9 commits into
mainfrom
feat/v3-home-dark-light-mode
Open

✨ Add light/dark theming support to the mega menu#146
joshbermanssw wants to merge 9 commits into
mainfrom
feat/v3-home-dark-light-mode

Conversation

@joshbermanssw

Copy link
Copy Markdown
Member

TL;DR

The v3 SSW.Website homepage is getting a light/dark toggle, and the mega menu needs to theme with it. This drives the menu's colours from CSS-variable design tokens (mirroring SSW.Website/styles.css) so it flips under a .dark scope with no dark: utilities.

What changed

  • Tokenstailwind.config.js maps foreground / background / muted-foreground / hairline to CSS vars + darkMode: "selector"; lib/index.css / src/index.css define the :root + .dark values.
  • Components — bar text, chevrons, dividers, search/country triggers use the tokens instead of hardcoded text-ssw-black / bg-gray-*.
  • Logo — swaps to the white-with-red dark-mode asset in dark (preserving the red ring) rather than inverting.
  • Chevrons — muted grey + a small gap, matching the redesign.
  • prepare build — lets SSW.Website consume this branch as a git dependency for preview deploys until it's published.

Reviewer notes

  • Backwards-compatible. Token values resolve to the current colours under :root, so consumers without a .dark scope render as before.

Links

  • Pairs with SSW.Website PR #4867 (v3 homepage light/dark mode).

🤖 Generated with Claude Code

joshbermanssw and others added 9 commits July 16, 2026 11:19
Drive the menu's colours from CSS-variable design tokens (foreground,
background, muted-foreground, hairline) that mirror SSW.Website's styles.css,
so the menu themes under a `.dark` scope with no `dark:` utilities. Swap the
logo to the white-with-red dark-mode asset, mute + gap the nav chevrons, and
tokenise the bar text/dividers. Adds a `prepare` build so the package can be
consumed as a git dependency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Point the dark logo at the consuming site's /images/ssw-logo-darkmode.svg
(matches the footer) instead of the CDN URL. Show the tagline only at 2xl so the
nav doesn't overflow at the xl breakpoint on the themed homepage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Size both logos by their natural aspect (h-14 w-auto) instead of squeezing the
wide dark 332×98 mark into a 100×60 box, so it no longer renders tiny. Make the
mobile hamburger use the foreground token so it's visible (white) in dark mode.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n homepage

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

- Dropdown panel/sidebar/text get dark variants (only under .dark, so
  every non-home route stays byte-identical)
- Light logo uses the recolored twin of the dark lockup SVG so the two
  themes share identical geometry

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant