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

Interactive Theme & Element Builder

Adjust live tokens, inspect how FAST elements respond, and copy valid CSS for Settings → Themes.

Live Element Preview (.app)
.tab[data-active]
.tab
Projects [data-kind="folder"]Folder
custom-theme.css [data-selected]1.2 KB
Generated Custom CSS
/* 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:

  1. src/styles/tokens.css + app.css + shell.css — Base theme variables and layout rules.
  2. #accent-css — Overrides --accent / --accent-text if changed from #4cc2ff.
  3. #imported-css — External .css files imported into config/css/, applied in list order and toggleable individually.
  4. #user-css — Live editor in Settings → Themes, applied instantaneously on every keystroke.
  5. #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:

text• Stable DOM hierarchy (docs/THEMING.md)
.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
└── .toast

4. CSS Custom Properties Reference

Surface & Background Colors
VariableDefault / RangeControls
--bg#1c1c1c / #eef1f5Window backdrop, tab strip, address bar and search inputs.
--surface#272727 / #ffffffToolbar, active tab, workspace content area.
--surface-raised#2d2d2d / #ffffffContext menus, dialogs, cards, popouts.
--surface-hoverrgba(..., 0.06)Row, tile, sidebar item, and button hover state.
--surface-activergba(..., 0.10)Pressed controls, active sidebar item, segmented buttons.
--borderrgba(..., 0.08)Hairline dividers between panes, headers, and cards.
--border-strongrgba(..., 0.16)Outlines on menus, dialogs, inputs, and buttons.
--shadow0 8px 28px rgba(0,0,0,0.45)Drop shadow beneath menus, dialogs, and detached ghosts.
Typography, Accent & Semantic Colors
VariableDefault / RangeControls
--text#f2f2f2 / #1b1b1bPrimary foreground text across lists, panes, and menus.
--text-muted#a3a3a3 / #616161Secondary labels, file metadata, shortcut hints, headings.
--accent#4cc2ff / #0067c0Focus rings, progress bars, switches, active sidebar bar, filtered headers.
--accent-text#00131f / #ffffffText color rendered on top of solid --accent buttons.
--selectioncolor-mix(--accent 24%, transparent)Selected file rows and grid tiles background.
--selection-bordercolor-mix(--accent 55%, transparent)Outline border of selected rows and tiles.
--danger#ff6b6b / #c42b1cDestructive actions, errors, and >90% full drive meters.
--warning#ffb347Warnings, paused transfers, and offline/caution badges.
Icons, Treemap & Rubber-Band Selection
VariableDefault / RangeControls
--icon-folder#f2c14e / #e6a700Base fill color of folder glyphs (respects data-folder).
--icon-file#9aa0a6 / #6b7280Stroke/outline color for generic file icons.
--icon-page#33363b / #f4f5f7Inner document page fill for file icons.
--treemap-text#ffffffLabels rendered inside Disk Usage treemap frames.
--band-fillcolor-mix(--accent 18%, transparent)Fill of the marquee/rubber-band selection rectangle.
--band-border / --band-border-widthvar(--accent) / 1pxBorder color, thickness, and dash style of selection box.
--window-imageurl(...)Custom imported background image applied when data-bg="image".
Geometry, Sizing & Per-Area Fonts
VariableDefault / RangeControls
--font / --font-monoSegoe UI Variable / Cascadia MonoGlobal interface font stack and monospace paths/code stack.
--font-files / --font-sidebar / --font-toolbarinherit from --fontIndependent font stacks for file list, nav pane, and chrome bars.
--font-size / --font-size-small13px / 12pxBase and secondary text sizes (14px in comfortable density).
--radius / --radius-small8px / 4pxCorner roundness of dialogs/cards and rows/buttons/inputs.
--row-height26px (34px comfortable)Height of rows in Details, List, and simple lists.
--sidebar-width / --details-width220px / 300pxDefault widths of Navigation and Details panes.
--tab-width / --tab-min-width / --tab-height190px / 72px / 34pxTab sizing constraints before horizontal strip scrolling.
--ui-icon-size / --top-bar-scale / --left-bar-scale16px / 1 / 1Toolbar glyph size and proportional bar scaling.
--anim-fast / --anim-mid / --anim-slow90ms / 140ms / 180msMotion durations driven by data-anim-tier.
--anim-ease / --anim-springcubic-bezier(...)Easing curves for transitions and popout animations.

5. data-* Styling Hooks

SelectorValuesPurpose
: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 | appleControls window frame, titlebar, bevels, and layout geometry.
:root[data-density]compact | comfortableSwitches row heights (26px vs 34px) and base font sizing.
:root[data-menu]rounded | glass | outlined | floating | flatSurface treatment for context menus, popouts, and dropdowns.
:root[data-icons]fluent | outline | thin | boldToolbar and action glyph style pack.
:root[data-folder]classic | blue | mono | accentFolder icon coloring strategy.
:root[data-bg]solid | mica | acrylic | imageWindow backdrop surface treatment.
:root[data-motion] / [data-anim-tier]on | off // rough | balanced | smooth | expressiveMaster animation switch and performance-scaled timing tier.
:root[data-background]present when unfocusedAutomatically pauses all CSS animations when window loses focus.
:root[data-zebra] / [data-gridlines]boolean attributesEnables alternating row striping and subtle cell gridlines.
.app[data-os]windows | macos | linuxHost 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 | fileTargets rows or grid tiles by file classification.
.file-row[data-selected] / [data-cut] / [data-hidden]boolean attributesHighlights selected items, dims cut items, or styles hidden dotfiles.
.tab[data-active] / [data-grouped]boolean attributesStyles 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 attributesTriggered when drive usage >90% or drive/share is offline.
.transfer-card[data-phase] / .transfer-rate[data-display]counting|running|paused|done // bytes|files|mixedTargets 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):

css• Custom GPU animation example (Settings -> Themes / Custom UI animations)
: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