feat: add dark mode with theme toggle#23
Open
GindaChen wants to merge 1 commit into
Open
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
arbing
pushed a commit
to arbing/tab-out
that referenced
this pull request
Apr 18, 2026
- Dark mode set as default theme with light/dark toggle in header - Theme preference persists via chrome.storage.local - Colors managed through CSS variables (13 design tokens remapped) - Toggle button with sun/moon SVG icon in pill-shaped style https://claude.ai/code/session_0163Hnh7u3X82Wn4twSP7P28
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
chrome.storage.localvar()tokens — no hardcoded overridesWhy
The current light-only theme can be harsh on the eyes, especially for users who open new tabs frequently at night. Dark mode is the most-requested visual feature for new tab extensions.
What's included
[data-theme="dark"]block remaps all 13 design tokens (ink, paper, card-bg, accents, status colors, shadow) plus a reduced paper-texture opacity. Also adds.theme-togglebutton styles matching the existingaction-btndesign language.<button>in the header with a sun/moon SVG icon and a text label ("Light" / "Dark").loadTheme()reads from storage on page load (defaults to"dark"),applyTheme()sets thedata-themeattribute and swaps the icon,toggleTheme()flips and persists.How it works
loadTheme()readschrome.storage.local.theme— if unset (first install), defaults to"dark"data-theme="dark"on<html>, which activates the CSS variable overrides"light", saves to storage, swaps the icon to a moonTest plan
🤖 Generated with Claude Code