Repository navigation
Skins: built-in and user skins, adjustments, skin editor and guide - #42
Merged
Merged
Conversation
A skin decides the whole look: every color (surfaces, text, accent, selection, status, file icons, terminal, syntax highlighting), shadows, fonts, corner radii, row height and striped rows, in a light and/or a dark variant. - Skin engine (ui/src/lib/skins): 117 design tokens as CSS custom properties, inheritance via "extends", automatic derivation of tokens a skin leaves out (one accent or a nine-hue palette gives a consistent result), strict value validation (colors, box-shadows, fonts, numbers only), contrast checks. - Ten built-in skins: Rust Commander (default, unchanged look), Ember, Graphite, Retro Blue, High Contrast, Nord, Solarized, Catppuccin, Gruvbox, Dracula. All pass the contrast checks in every variant. - User skins are JSON files in <config dir>/skins/ (rc-api: skins.list, skins.save, skins.delete, event skins.changed); they reload when the window regains focus, so skins can be written in any editor. - Preferences → Appearance: theme, skin gallery with live previews, adjustments on top of any skin (accent, row height, list font size, corner radius, striped rows, fonts), import/export, skins folder. - Skin editor with grouped tokens, color pickers, live preview of panels, editor, terminal and controls, contrast warnings and a JSON view. - View → Skin menu; terminal and editor (CodeMirror) follow the skin; the last look is cached so theme-init.js applies it before the bundle loads. - Docs: Skins and appearance, Creating skins (tutorial, recipes, tools), generated token reference, JSON schema, screenshots. - Tests: Rust unit/dispatch tests, UI unit tests (colors, validation, derivation, inheritance, built-in skins, base.css/schema/docs in sync), smoke test step; scripts/skins.mjs (check, format, schema, docs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017w9FQiSrVuuoxVYUhih6uc
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
Rust Commander gets skins. A skin controls the whole look: every color (surfaces, text, accent, selection, status, file icons, terminal, syntax highlighting), plus shadows, fonts, corner radii, row height and striped rows. A skin can have a light variant, a dark variant, or both.
Ten built-in skins
Every variant of every skin passes the contrast checks.
Customization
How it works
ui/src/lib/skins/extendsurl(),var()and raw CSS are rejectedui/src/skins/, so they also serve as examples.skin.schema.jsonlets editors autocomplete skin files.<config dir>/skins/:crates/rc-api/src/skins.rs, with the RPC methodsskins.list,skins.save,skins.deleteand theskins.changedeventappearanceobject (skin id and adjustments). Oldersettings.jsonfiles load with the default skin.theme-init.jsapplies the cached look before the bundle loads, so there is no flash of the default colors.Docs
Tests
cargo test -p rc-api:appearancecargo fmt --checkandcargo clippy -p rc-api --all-targetsare clean.npm --prefix ui test:base.cssstaying in sync with the default skin, the schema and docs matching the tokens.node ui/scripts/skins.mjs check: contrast is ok for all 18 variants.Generated by Claude Code