Skip to content

Light and dark theme switch in the app's header - #46

Merged
Ege-BULUT merged 1 commit into
mainfrom
light-theme
Nov 5, 2026
Merged

Ege-BULUT merged 1 commit into
mainfrom
light-theme

Conversation

@Ege-BULUT

Copy link
Copy Markdown
Owner

The app already had a light theme, but it only followed the system. This adds a sun/moon button to the sidebar header so the theme can be picked by hand.

  • The theme follows the system until the button picks one. The choice is kept under oc-theme, and index.html sets it before the first paint so the page does not flash.
  • Picking the theme the system already has goes back to following the system.
  • The dark rules now hang off data-theme instead of prefers-color-scheme. :where() keeps each one as specific as the light rule it replaces.
  • theme-color follows the theme in use.
  • Web only for now: no version bump. Android and desktop get it with the next release.

Tests: a new theme section in test/app.e2e.mjs, and the browser suite passes 104/104.

The theme follows the system until the sun/moon button picks one; the choice is
kept under oc-theme and set before the first paint. Picking the theme the system
has goes back to following it.
@Ege-BULUT
Ege-BULUT merged commit aa74b85 into main Nov 5, 2026
1 check passed
@Ege-BULUT
Ege-BULUT deleted the light-theme branch November 5, 2026 11:15
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