Add custom theme support via CSS plugin - #1
Merged
Conversation
Users can load any .css file as a custom theme via the new "+ CSS" button in the theme bar. The CSS is injected into a <style> tag and persisted to localStorage so the theme survives page reloads without re-picking the file. The "Custom" button (dashed border) appears once a theme is loaded and can re-activate it after switching to a built-in theme. clearCustomTheme() resets to dark. Missing variables fall back to the dark theme via CSS cascade. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents the new + CSS button and plugin format in README, updates the CONTRIBUTING guide to reference the CSS plugin system, and adds the three new theme functions to the CLAUDE.md key functions table. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
.cssfile picker (File System Access API)<style>tag and persisted tolocalStorage(mb-custom-css) — no re-picking needed on reloadclearCustomTheme()is available in the console to reset back to dark+ CSSbutton is hidden alongside other File API controls on non-Chrome browsersCSS plugin format
Test plan
+ CSS, load a.cssfile with[data-theme="custom"] { --accent: hotpink; }— confirm accent changesnpm testpasses (20 unit tests)npm run test:e2epasses (updated theme button count assertion)🤖 Generated with Claude Code