Repository navigation
feat(web): dark mode for the site and docs - #147
Merged
Merged
Conversation
Follows the system preference by default, with a light/dark switch in the navbar and the docs sidebar. next-themes sets the class before first paint; on the client its script is rendered as text/plain so switching tr/en no longer reports it. The palette gets a dark Signal Indigo set, hard-coded colours in components move to tokens, docs code uses a dark Shiki theme, the logo and hero have dark variants, third-party logos keep a light tile and the animated icons are inverted and screen-blended.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Before: the site and docs were light only; next-themes was turned off.
After: both follow the system preference by default, with a light/dark switch in the navbar (desktop and mobile menu) and in the docs sidebar. The choice is remembered.
How:
globals.cssgets a dark "Signal Indigo" token set under.dark, plus tokens for colours that were hard-coded in components (callouts, code function colour, glows, shadows, route wires, logo tiles, accent text on tints). Light mode values are unchanged.SiteProvider. Its inline script still sets the class before first paint; on the client it is rendered astext/plain, so switching tr/en no longer logs the "script tag" error that got it turned off.better-payment-horizontal-dark.svg(lifted indigo mark, light wordmark). Hero:hero-a3-dark.webp, the same render with its lightness inverted onto the dark background.Checked in both themes on the homepage, docs index and a provider page (desktop and mobile), and that tr/en switching logs no errors. No changeset: only the private
webapp changes.Checklist
pnpm lintpasses for the changed files (remaining errors are in generated.source/files, same as main),tsc --noEmitandnext buildpass<Since />badge, or no badge is needed