Skip to content

feat(#3873): add dark mode styles to AppHeader, Dropdown, WorkSideMenu, and body#3874

Draft
twjeffery wants to merge 2 commits intodevfrom
tom/dark-mode-svelte-hooks
Draft

feat(#3873): add dark mode styles to AppHeader, Dropdown, WorkSideMenu, and body#3874
twjeffery wants to merge 2 commits intodevfrom
tom/dark-mode-svelte-hooks

Conversation

@twjeffery
Copy link
Copy Markdown
Collaborator

@twjeffery twjeffery commented Apr 24, 2026

Summary

Four small Svelte changes so dark mode can target colours that are currently hardcoded.

Changes

  1. reset.css body background. Changed #fff to reference --goa-color-greyscale-white.

  2. Dropdown native chevron. Replaced the pseudo-element chevron (hardcoded #333 stroke) with an inline SVG that follows --goa-dropdown-color-text. Same size and position as before.

  3. WorkSideMenu account popover background. Added --goa-work-side-menu-account-bg so dark mode can give the popover its own background. Token is added in the design-tokens package in feat(#3873): add work-side-menu-account-bg token design-tokens#154.

  4. AppHeader and WorkSideMenu logos. Added dark variant SVGs and a MutationObserver on the data-theme attribute so logos swap between light and dark when the theme changes.

Note on the logo pattern

The logos use JS (a MutationObserver on the data-theme attribute) to swap the <img src> between light and dark variants. The rest of the dark mode story is pure CSS cascade. This inconsistency is intentional for now: multi-colour branded imagery doesn't convert cleanly to currentColor-based inline SVG, and a proper refactor would be significantly larger. Happy to discuss a cleaner pattern in a follow-up if the team prefers.

Context

Companion to #3850 (dark mode spike). The spike covered most of dark mode through token overrides. These changes address the shadow-DOM gaps the cascade can't reach.

How to test

  1. npm install
  2. npx nx serve react-prs
  3. On the Everything page, Dropdowns section, the new native dropdown should look the same as before.
  4. Logo swap: open devtools, run document.documentElement.setAttribute('data-theme', 'dark'). AppHeader and WorkSideMenu logos swap. Run with 'light' to swap back.

Fixes #3873

@twjeffery twjeffery marked this pull request as ready for review April 24, 2026 04:30
@twjeffery twjeffery marked this pull request as draft April 24, 2026 15:55
@twjeffery twjeffery removed the request for review from vanessatran-ddi April 24, 2026 15:55
@twjeffery twjeffery force-pushed the tom/dark-mode-svelte-hooks branch from f6d7723 to d3c0858 Compare April 24, 2026 15:56
@twjeffery twjeffery changed the title feat(#3873): add dark mode styles to Dropdown, WorkSideMenu, and body feat(#3873): add dark mode styles to AppHeader, Dropdown, WorkSideMenu, and body Apr 24, 2026
@twjeffery twjeffery marked this pull request as ready for review April 24, 2026 16:20
@vanessatran-ddi vanessatran-ddi marked this pull request as draft April 27, 2026 14:15
@vanessatran-ddi vanessatran-ddi self-assigned this Apr 27, 2026
@vanessatran-ddi vanessatran-ddi force-pushed the tom/dark-mode-svelte-hooks branch from ecb080a to 4cd14d1 Compare April 29, 2026 23:56
…vice

Co-authored-by: Thomas Jeffery <thomaswjeffery@gmail.com>
@vanessatran-ddi vanessatran-ddi force-pushed the tom/dark-mode-svelte-hooks branch from 4cd14d1 to c0ee586 Compare April 30, 2026 00:06
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.

Add dark mode styles to AppHeader, Dropdown, WorkSideMenu, and body

2 participants