Track C // Theme Authoring & CSS Specification
Element & Styling Guide
Every pixel of FAST File Explorer is driven by stable CSS custom properties, semantic classes, and data-* hooks. Design your own look live below, then paste it straight into Settings → Themes.
1. Interactive Theme & Element Builder
Adjust live tokens, inspect how FAST elements respond, and copy valid CSS for Settings → Themes.
/* Paste into FAST File Explorer -> Settings -> Themes */
:root {
--bg: #202020;
--surface: #2b2b2b;
--surface-raised: #323232;
--text: #ffffff;
--text-muted: #a3a3a3;
--accent: #4cc2ff;
--icon-folder: #ffb900;
--selection: color-mix(in srgb, var(--accent) 24%, transparent);
--selection-border: color-mix(in srgb, var(--accent) 55%, transparent);
--radius: 8px;
--radius-small: 4px;
--row-height: 28px;
--sidebar-width: 220px;
}
.file-row[data-kind="folder"] .file-name {
font-weight: 600;
}2. Live Injection, Asset Imports & Security
FAST File Explorer layers styles in deterministic order via src/useAppearance.ts:
src/styles/tokens.css+app.css+shell.css— Base theme variables and layout rules.#accent-css— Overrides--accent/--accent-textif changed from#4cc2ff.#imported-css— External.cssfiles imported intoconfig/css/, applied in list order and toggleable individually.#user-css— Live editor in Settings → Themes, applied instantaneously on every keystroke.#user-animations-css— Injected after built-in motion whenever:root[data-motion="on"].
Imported fonts (.ttf/.otf/.woff/.woff2), stylesheets, and background pictures are copied into the app’s fonts/, css/, and images/ subfolders. The Tauri CSP strictly blocks remote URLs inside CSS so themes stay offline-safe.
3. Complete Element & Class Anatomy (.app Tree)
These structural class names are guaranteed stable across releases as the official theming interface:
.app[data-os="windows|macos|linux"]
├── .tab-bar
│ ├── .tab-group-chip
│ ├── .tab-slot (--group-color set here) -> .tab[data-active][data-grouped]
│ │ ├── .tab-title
│ │ └── .tab-close
│ └── .tab-new
├── .toolbar
│ ├── .nav-buttons
│ ├── .address-bar -> .breadcrumbs -> .crumb-wrap -> .crumb
│ ├── .search-box
│ └── .tool-buttons -> .settings-button
├── .workspace
│ ├── .sidebar -> .side-heading, .side-item[data-active] -> .side-label, .side-sub
│ ├── .content
│ │ ├── .file-view[data-view="details|grid"]
│ │ │ ├── .file-header -> .column-header[data-column][data-sorted]
│ │ │ ├── .file-row / .file-tile [data-selected][data-cut][data-hidden][data-kind="..."]
│ │ │ │ ├── .cell.cell-name -> .file-icon, .file-name
│ │ │ │ └── .cell.cell-date, .cell-type, .cell-size
│ │ │ └── .status-bar -> .status-clipboard
│ │ ├── .home-view -> .pin-card, .simple-row
│ │ ├── .drives-view -> .drive-card[data-offline][data-nearly-full] -> .meter -> .meter-fill, .donut
│ │ ├── .search-view -> .search-summary, .search-row
│ │ └── .analyzer-view -> .treemap, .largest-row
│ └── .details-pane -> .details-preview, .details-title, .details-list
├── .transfers -> .transfer-card[data-phase] -> .meter, .transfer-rate[data-display]
├── .context-menu -> .menu-item[data-menu-id][data-danger], .menu-separator
├── .settings -> .settings-nav, .settings-body -> .setting[data-setting="..."]
├── .dialog
└── .toast4. CSS Custom Properties Reference
| Variable | Default / Range | Controls |
|---|---|---|
| --bg | #1c1c1c / #eef1f5 | Window backdrop, tab strip, address bar and search inputs. |
| --surface | #272727 / #ffffff | Toolbar, active tab, workspace content area. |
| --surface-raised | #2d2d2d / #ffffff | Context menus, dialogs, cards, popouts. |
| --surface-hover | rgba(..., 0.06) | Row, tile, sidebar item, and button hover state. |
| --surface-active | rgba(..., 0.10) | Pressed controls, active sidebar item, segmented buttons. |
| --border | rgba(..., 0.08) | Hairline dividers between panes, headers, and cards. |
| --border-strong | rgba(..., 0.16) | Outlines on menus, dialogs, inputs, and buttons. |
| --shadow | 0 8px 28px rgba(0,0,0,0.45) | Drop shadow beneath menus, dialogs, and detached ghosts. |
| Variable | Default / Range | Controls |
|---|---|---|
| --text | #f2f2f2 / #1b1b1b | Primary foreground text across lists, panes, and menus. |
| --text-muted | #a3a3a3 / #616161 | Secondary labels, file metadata, shortcut hints, headings. |
| --accent | #4cc2ff / #0067c0 | Focus rings, progress bars, switches, active sidebar bar, filtered headers. |
| --accent-text | #00131f / #ffffff | Text color rendered on top of solid --accent buttons. |
| --selection | color-mix(--accent 24%, transparent) | Selected file rows and grid tiles background. |
| --selection-border | color-mix(--accent 55%, transparent) | Outline border of selected rows and tiles. |
| --danger | #ff6b6b / #c42b1c | Destructive actions, errors, and >90% full drive meters. |
| --warning | #ffb347 | Warnings, paused transfers, and offline/caution badges. |
| Variable | Default / Range | Controls |
|---|---|---|
| --icon-folder | #f2c14e / #e6a700 | Base fill color of folder glyphs (respects data-folder). |
| --icon-file | #9aa0a6 / #6b7280 | Stroke/outline color for generic file icons. |
| --icon-page | #33363b / #f4f5f7 | Inner document page fill for file icons. |
| --treemap-text | #ffffff | Labels rendered inside Disk Usage treemap frames. |
| --band-fill | color-mix(--accent 18%, transparent) | Fill of the marquee/rubber-band selection rectangle. |
| --band-border / --band-border-width | var(--accent) / 1px | Border color, thickness, and dash style of selection box. |
| --window-image | url(...) | Custom imported background image applied when data-bg="image". |
| Variable | Default / Range | Controls |
|---|---|---|
| --font / --font-mono | Segoe UI Variable / Cascadia Mono | Global interface font stack and monospace paths/code stack. |
| --font-files / --font-sidebar / --font-toolbar | inherit from --font | Independent font stacks for file list, nav pane, and chrome bars. |
| --font-size / --font-size-small | 13px / 12px | Base and secondary text sizes (14px in comfortable density). |
| --radius / --radius-small | 8px / 4px | Corner roundness of dialogs/cards and rows/buttons/inputs. |
| --row-height | 26px (34px comfortable) | Height of rows in Details, List, and simple lists. |
| --sidebar-width / --details-width | 220px / 300px | Default widths of Navigation and Details panes. |
| --tab-width / --tab-min-width / --tab-height | 190px / 72px / 34px | Tab sizing constraints before horizontal strip scrolling. |
| --ui-icon-size / --top-bar-scale / --left-bar-scale | 16px / 1 / 1 | Toolbar glyph size and proportional bar scaling. |
| --anim-fast / --anim-mid / --anim-slow | 90ms / 140ms / 180ms | Motion durations driven by data-anim-tier. |
| --anim-ease / --anim-spring | cubic-bezier(...) | Easing curves for transitions and popout animations. |
5. data-* Styling Hooks
| Selector | Values | Purpose |
|---|---|---|
| :root[data-theme] | 40 theme IDs (dark, nord, win11-dark, mac-glass-light...) | Active color palette block from tokens.css. |
| :root[data-chrome] | windows | windows10 | winxp | win95 | mac-glass | macos | mac-classic | linux | kde | xfce | google | samsung | apple | Controls window frame, titlebar, bevels, and layout geometry. |
| :root[data-density] | compact | comfortable | Switches row heights (26px vs 34px) and base font sizing. |
| :root[data-menu] | rounded | glass | outlined | floating | flat | Surface treatment for context menus, popouts, and dropdowns. |
| :root[data-icons] | fluent | outline | thin | bold | Toolbar and action glyph style pack. |
| :root[data-folder] | classic | blue | mono | accent | Folder icon coloring strategy. |
| :root[data-bg] | solid | mica | acrylic | image | Window backdrop surface treatment. |
| :root[data-motion] / [data-anim-tier] | on | off // rough | balanced | smooth | expressive | Master animation switch and performance-scaled timing tier. |
| :root[data-background] | present when unfocused | Automatically pauses all CSS animations when window loses focus. |
| :root[data-zebra] / [data-gridlines] | boolean attributes | Enables alternating row striping and subtle cell gridlines. |
| .app[data-os] | windows | macos | linux | Host OS identifier on the root .app container. |
| .file-row[data-kind] / .file-tile[data-kind] | folder | image | video | audio | archive | code | doc | sheet | slides | exe | file | Targets rows or grid tiles by file classification. |
| .file-row[data-selected] / [data-cut] / [data-hidden] | boolean attributes | Highlights selected items, dims cut items, or styles hidden dotfiles. |
| .tab[data-active] / [data-grouped] | boolean attributes | Styles active tab and grouped tabs (reads --group-color on .tab-slot). |
| .menu-item[data-menu-id][data-danger] | e.g. data-menu-id="delete" | Targets specific right-click menu entries and destructive items. |
| .drive-card[data-nearly-full] / [data-offline] | boolean attributes | Triggered when drive usage >90% or drive/share is offline. |
| .transfer-card[data-phase] / .transfer-rate[data-display] | counting|running|paused|done // bytes|files|mixed | Targets transfer card phase and dominant speed unit display. |
6. All 40 Built-in Themes (data-theme)
Every built-in theme ID below can be targeted directly with :root[data-theme="<id>"]:
Glass Dark
dark
Glass Light
light
Midnight
midnight
Graphite
graphite
Nord
nord
Dracula
dracula
Solarized Dark
solarized-dark
Solarized Light
solarized-light
Forest
forest
Sepia
sepia
Rose
rose
Windows 11 Dark
win11-dark
Windows 11 Light
win11-light
Windows 10 Dark
win10-dark
Windows 10 Light
win10-light
Windows 10 Slate
win10-slate
Windows XP Light
winxp-light
Windows XP Slate Dark
winxp-dark
Windows 95 Classic
win95-light
Windows 95 Dark
win95-dark
macOS Liquid Glass Dark
mac-glass-dark
macOS Liquid Glass Light
mac-glass-light
macOS Dark
mac-dark
macOS Light
mac-light
Classic Mac OS
mac-classic-light
Classic Mac OS Dark
mac-classic-dark
GNOME Dark
adwaita-dark
GNOME Light
adwaita-light
KDE Breeze Dark
breeze-dark
KDE Breeze Light
breeze-light
XFCE Dark
xfce-dark
XFCE Light
xfce-light
Google Dark
material-dark
Google Light
material-light
Samsung Dark
oneui-dark
Samsung Light
oneui-light
iOS Dark
ios-dark
iOS Light
ios-light
High Contrast Dark
contrast-dark
High Contrast Light
contrast-light
7. Per-Area Fonts & GPU-Composited UI Animations
You can assign distinct fonts to five UI zones under Settings → Themes → Fonts for each part (or via CSS variables): --font-files, --font-sidebar, --font-toolbar, --font-mono (paths & F3 viewer), and terminal.fontFamily.
Built-in animations animate only transform and opacity so virtualized scrolling stays at zero reflow, and pause automatically when :root[data-background] is set. Scale timings automatically via data-anim-tier (rough ≤20, balanced 21..45, smooth 46..80, expressive 81..100):
:root[data-motion="on"] {
--anim-mid: 180ms;
--anim-spring: cubic-bezier(0.2, 0.9, 0.2, 1.15);
}
@keyframes fast-menu-pop {
from { opacity: 0; transform: scale(0.96) translateY(-4px); }
to { opacity: 1; transform: none; }
}
:root[data-motion="on"] .context-menu,
:root[data-motion="on"] .popout-panel {
animation: fast-menu-pop var(--anim-fast) var(--anim-spring);
}8. Recovering From Broken Custom CSS
If custom CSS hides the Settings button or renders text unreadable, close the app and clear appearance.customCss inside settings.json:
- • Windows:
%APPDATA%\dev.envid.fastfileexplorer\settings.json - • macOS:
~/Library/Application Support/dev.envid.fastfileexplorer/settings.json - • Linux:
~/.config/dev.envid.fastfileexplorer/settings.json