Repository navigation
feat(extension): share the redesigned theme with web via @crypt.fyi/theme - #165
Merged
Merged
Conversation
…heme The web redesign left the extension settings page on the old neutral palette, with tokens copied by hand. Its dark tokens also nested @theme in a media query, which Tailwind flattens, so the page always rendered dark. - Add a private, build-free @crypt.fyi/theme package holding the tokens, fonts, preference logic and the pre-paint theme-init.js script. - Move web onto the package. Its compiled CSS changes only in how fonts are referenced, plus the removal of an unused .ring class. - Rebuild the settings page on the shared tokens with a System/Light/Dark control. It stays plain HTML, so UI components are not shared. - Override the font and 75% text size Chrome injects on extension pages, which would otherwise beat the theme's layered base styles. - Test the colors copied into theme-init.js so they cannot drift.
dillonstreator
deleted the
claude/chrome-extension-redesign-sync-5adfab
branch
November 6, 2026 22:27
Merged
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 changed
@crypt.fyi/themepackage (private, no build step): light and dark tokens, the Tailwind theme mapping, self-hosted fonts, theme preference logic, andtheme-init.jswith a small Vite plugin that serves it and adds its script tag.main.tsonly gains a theme import.AGENTS.md, extension README, package README) and a changeset.Why
The redesign in #159 only touched web, so the settings page kept the old look and a hand-copied palette.
It also had a bug:
styles.cssnested@themeinside@media (prefers-color-scheme: dark). Tailwind drops the media query, so the dark values overwrote the light ones and the page was always dark.Notes for reviewers
styles.csshas a few equivalent CSS classes instead..ringclass is gone. It was generated only because Tailwind scanned the wordringin the old config.theme-init.jsmoved frompackages/web/publictopackages/theme/src. The URL is still/theme-init.js, so CSP is unaffected and nostyle-srchashes changed.bodyrule in the extension: Chrome injects its own font and 75% text size on extension pages, and that beats Tailwind's layered base styles.localStorage.Testing
web,extensionandtheme, including 12 new tests intheme.pnpm test:e2e: all 5 tests pass, including the CSP and theme specs.Not tested: the extension's own
devmode, the Docker image, and a normal non-headless Chrome.Existing behavior, not addressed here: on a fresh profile in headless Chromium, the form stayed empty for about 2 seconds on first load. The unmodified extension also showed an empty form after 1.5 seconds, so this isn't new.