UniGit supports theming in two layers:
- End-user custom themes through the Appearance section in the app.
- Full built-in themes in code by adding a new preset to the stylesheet and theme settings.
The current implementation is centered around CSS variables applied to document.documentElement.
Open Repo Manager, then go to the Appearance section.
If you want a simple custom theme:
- Select
Custom. - Pick a base preset such as
Dark,Light, orLiquid Glass. - Paste a JSON object with CSS variable overrides.
Example:
{
"--accent": "#8cb6ff",
"--accent-2": "#72f0df",
"--surface-card": "rgba(255, 255, 255, 0.08)",
"--surface-button": "rgba(255, 255, 255, 0.12)",
"--line-strong": "rgba(140, 182, 255, 0.42)"
}A larger paste-ready example is available at docs/examples/aurora-glass-theme.json.
Important:
- Custom themes in the current UI override CSS variables only.
- The JSON must be a flat object.
- Keys must start with
--. - Values must be strings or numbers.
The app applies theme presets in src/app/App.tsx by:
- Setting
document.documentElement.dataset.theme - Setting
document.documentElement.style.colorScheme - Applying any custom variable overrides directly on the root element
Theme preset IDs, saved state, JSON parsing, and validation live in src/app/utils/themeSettings.ts.
All theme variables and theme-specific selector overrides live in src/styles.css.
The main pattern is:
:root[data-theme="my-theme"] {
--accent: #8cb6ff;
--surface-card: rgba(255, 255, 255, 0.08);
}
:root[data-theme="my-theme"] .panel,
:root[data-theme="my-theme"] .change-card {
backdrop-filter: blur(28px) saturate(165%);
}These variables give the biggest visual change with the least work:
--app-background--panel-bg-start--panel-bg-end--surface-section--surface-row--surface-card--surface-input--surface-button--surface-button-strong--surface-button-active--surface-selection--surface-selection-soft--line--line-strong--text-1--text-2--text-3--accent--accent-2--control-accent
For glass-like themes, these extra variables matter as well:
--panel-backdrop-filter--surface-backdrop-filter--control-backdrop-filter--glass-surface-highlight--glass-control-highlight--glass-surface-shadow--glass-control-shadow--glass-rim
If variables alone are not enough, these selectors are the main places to add extra treatment:
.panel.repo-tab.repo-manager-section.repo-manager-row.lane.change-card.selection-card.commit-box.preview-frame.branch-panel.branch-row.graph-viewport.icon-button.ghost-button.branch-chip.sync-chip.changes-filter.changes-select.commit-box__input.history-filter
The existing liquid-glass theme in src/styles.css is a good example of using both variables and targeted selectors.
If you want a first-class theme preset instead of JSON overrides:
- Add the new preset ID to src/app/utils/themeSettings.ts.
- Add its label and description to
themeOptions. - Add a
:root[data-theme="your-theme"]block in src/styles.css. - Add any theme-specific selector rules below the shared button and panel styles.
- Make sure the runtime
colorSchemein src/app/App.tsx matches the visual intent of the theme.
Use dark unless the theme is genuinely light, because native scrollbars and form controls follow that setting.
An example preset file is available at docs/examples/aurora-glass-theme.css.
An example JSON override file is available at docs/examples/aurora-glass-theme.json.
That file is designed to be pasted into the app's Custom theme textarea.
It shows:
- A complete variable-only version of the Aurora Glass look
- Real gradient, shadow, blur, and surface values in JSON form
- A format that matches the validation rules in the app
That file shows:
- A complete
:root[data-theme="aurora-glass"]variable block - Shared glass variables
- Theme-specific selector overrides for panels, cards, controls, and the graph viewport
Note:
- The example CSS file is for contributors adding a built-in theme or for future import tooling.
- The example JSON file is for end users customizing the app today.
- The example CSS file can do more than JSON because selector-specific rules like
.panelor.graph-viewportcannot be represented in the current custom theme editor.