Skip to content

feat(theme): add dark mode support#703

Open
alifazl3 wants to merge 1 commit into
conventional-commits:masterfrom
alifazl3:master
Open

feat(theme): add dark mode support#703
alifazl3 wants to merge 1 commit into
conventional-commits:masterfrom
alifazl3:master

Conversation

@alifazl3

Copy link
Copy Markdown

Add a theme toggle in the header that switches between light and dark.
The preference is initialised from the OS (prefers-color-scheme),
overridable by the user and persisted in localStorage. An inline script
in applies the saved theme before the stylesheet is parsed to
avoid a flash of the wrong theme.

  Add a theme toggle in the header that switches between light and dark.
  The preference is initialised from the OS (prefers-color-scheme),
  overridable by the user and persisted in localStorage. An inline script
  in <head> applies the saved theme before the stylesheet is parsed to
  avoid a flash of the wrong theme.
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