Skip to content

feat(storybook): add comprehensive dark mode support#5

Merged
wreiske merged 4 commits intomainfrom
updates/darkmode-support
Jan 22, 2026
Merged

feat(storybook): add comprehensive dark mode support#5
wreiske merged 4 commits intomainfrom
updates/darkmode-support

Conversation

@garrity-miepub
Copy link
Copy Markdown
Contributor

  • Add preview.css with dark mode styles for Storybook docs pages

    • Style docs wrapper, content areas, and story previews
    • Theme args table (property/description tables) with dark backgrounds
    • Style control inputs, buttons, and code blocks
    • Add custom scrollbar styling for dark mode
  • Update manager.ts with dark mode theming for manager UI

    • Add dark mode color variants to all brand themes
    • Create dynamic theme switching via createBrandTheme(brand, isDark)
    • Inject dark mode CSS overrides for sidebar, toolbar, and panels
    • Listen for theme global changes to update manager theme in real-time
  • Update preview.tsx to apply theme colors to document body

    • Set body background and text colors based on theme
    • Ensures entire content area respects dark mode selection
  • Preview mode

    • Fixed the height of the preview area
darkmode.mov

- Add preview.css with dark mode styles for Storybook docs pages
  - Style docs wrapper, content areas, and story previews
  - Theme args table (property/description tables) with dark backgrounds
  - Style control inputs, buttons, and code blocks
  - Add custom scrollbar styling for dark mode

- Update manager.ts with dark mode theming for manager UI
  - Add dark mode color variants to all brand themes
  - Create dynamic theme switching via createBrandTheme(brand, isDark)
  - Inject dark mode CSS overrides for sidebar, toolbar, and panels
  - Listen for theme global changes to update manager theme in real-time

- Update preview.tsx to apply theme colors to document body
  - Set body background and text colors based on theme
  - Ensures entire content area respects dark mode selection
…backgrounds

The story wrapper div was using CSS variable references (var(--mieweb-background))
in inline styles, but these were being cached and not updating when switching
between brands. This caused all brands to show the same black background in
dark mode instead of their brand-specific dark colors.

Changes:
- Extract semanticColors from brand config based on isDark state
- Apply actual hex color values directly to wrapper div inline styles
- Apply actual color values to document.body for consistent backgrounds
- Build font family string directly instead of using CSS variable

This ensures each brand displays its unique dark mode background:
- BlueHive: Blue-tinted dark (#0c1929)
- Enterprise Health: Purple-tinted dark (#0f172a)
- WebChart: Warm amber-tinted dark
- MIE Web: Green-tinted dark
- Default: Slate blue dark (#0f172a)
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8f4f917
Status: ✅  Deploy successful!
Preview URL: https://63c76ffc.ui-6d0.pages.dev
Branch Preview URL: https://updates-darkmode-support.ui-6d0.pages.dev

View logs

@garrity-miepub garrity-miepub marked this pull request as ready for review January 22, 2026 00:52
@wreiske wreiske merged commit a71a93a into main Jan 22, 2026
1 check 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