Repository navigation
Conversation
Users pick a theme in Settings > Appearance. Each theme is light or dark and sets Electron's color scheme, the theme colors, and the wallpaper variant. Consumers add themes and set the default with `appearance` in createEden, and change the theme through eden.appearance.
- Reject theme values that could break the stylesheet: quotes, url(), !important, and unbalanced parentheses. Colors set to undefined use the inherited color. - Replace a view's theme stylesheet when Eden CSS is injected again, instead of tracking navigation starts that may not replace the page. - Apply appearance settings only from committed writes, and use the default for an unconfigured theme, as at startup. - Update the main window background when the theme changes, and pass it only colors Electron reads the same way as CSS.
- Calculator operators, Files pin colors, warning contrast and the on-screen keyboard now read correctly in light themes. - Foundation no longer flashes a dark wallpaper before the stored one loads. - Replace references to undefined color tokens. - Primary actions use accent-primary so themes can recolor them. - Settings refreshes the Appearance panel when the theme or wallpaper changes. - Theme values must be a single CSS color. - Theme previews use their own color scheme.
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
Adds light and dark themes to Eden.
nativeTheme.themeSource), applies the theme's colors, and switches wallpaper presets to their light or dark variant. For example, Pure Black becomes Pure White.createEden({ appearance: { themes, defaultTheme } }). A theme overrides any--eden-color-*token, and tokens it leaves out keep the built-in values of its scheme. Eden validates the configuration at startup.eden.appearance.getState(),getThemes(),setTheme()andonAppearanceChanged(). Apps use theappearance/get-appearance,appearance/get-themesandappearance/set-themecommands and theappearance/appearance-changedevent.light-dark(). Hard-coded rgba tints in components are nowcolor-mix()of tokens. Shadows have lighter light-mode values.dev-pinktheme instead of a separate token file.Docs: new
docs/themes.md.Testing
main.🤖 Generated with Claude Code