Skip to content

feat: implement light/dark theme toggle#56

Merged
truthixify merged 2 commits into
wraith-protocol:developfrom
pharwasz:feature/light-dark-theme-toggle-clean
Jun 26, 2026
Merged

feat: implement light/dark theme toggle#56
truthixify merged 2 commits into
wraith-protocol:developfrom
pharwasz:feature/light-dark-theme-toggle-clean

Conversation

@pharwasz

@pharwasz pharwasz commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Closes #25


Summary

This PR implements a complete light/dark theme system for the Wraith website while preserving the existing dark theme experience.

Changes

  • Added a light theme using CSS custom properties with :root[data-theme="light"]
  • Refactored theme colors to use CSS variables for both themes
  • Added a theme toggle to the header (desktop and mobile)
  • Persisted the selected theme using localStorage
  • Defaulted to the user's system preference via prefers-color-scheme
  • Added an inline initialization script to prevent first-paint theme flashing
  • Added smooth 200ms transitions when switching themes
  • Updated the browser theme-color dynamically to match the active theme
  • Improved accessibility with descriptive aria-label, aria-pressed, and title attributes on the theme toggle
  • Documented the light theme design in design/wraith.pen

Testing

  • Theme toggles correctly between light and dark modes
  • Theme preference persists after page refresh
  • Defaults to prefers-color-scheme when no saved preference exists
  • No flash of the incorrect theme on initial page load
  • Desktop header toggle works correctly
  • Mobile menu theme toggle works correctly
  • Project builds successfully (pnpm build)

Screenshots

Dark Theme

image

Light Theme

image

Notes

This implementation follows the issue requirements by:

  • Using CSS variables for all theme colors
  • Supporting both dark and light themes
  • Persisting the user's preference
  • Respecting system theme preferences
  • Preventing first-paint theme flashing
  • Maintaining smooth theme transitions
  • Improving accessibility of the theme toggle

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@pharwasz is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@pharwasz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify

Copy link
Copy Markdown
Contributor

Clean merge. Light/dark theme toggle in Header + CSS vars + pencil file update. Thanks @pharwasz.

@truthixify truthixify merged commit cf434d6 into wraith-protocol:develop Jun 26, 2026
0 of 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.

Light/dark theme toggle

2 participants