// OPENBOX DOCS

Design system

The real CSS variables, typography, layout, and component specs for theme authoring.

OpenBoxGL's base stylesheet uses a dark, warm game-room palette: near-black surfaces, warm off-white text, and amber (#e1b866) as the focus/selection/launch signal. This page documents the actual variables shipped in the application's index.html, not a separate token layer. Theme authors override these variables in a CSS file imported through Themes.

Base palette

All colors are dark by default. Neutral surfaces carry most of the screen; the amber family identifies focus, selection, and launch action.

Neutral surfaces

TokenValueUse
--bg#11100ePage canvas, deepest fullscreen surfaces
--topbar#171513Command rail background
--panel#1b1916Sidebar, detail pane, dialogs, lifecycle surfaces
--panel2#24211dSecondary panel tone
--surface-deep#141311Sticky library header background
--surface-header#1c1916Header surface
--surface-card#211e1aDetail cards, emulator items, result rows, history items
--surface-field#27231eForm controls, secondary buttons
--surface-hover#342d23Hovered raised panels
--border-control#4b4338Control borders
--border-card#534a3dCard and dialog borders
--line#3d3932Borders, dividers, separator rules
--text#f4efe6Primary titles, high-priority content
--muted#aaa094Metadata, labels, helper copy, inactive navigation

Accent colors

TokenValueUse
--focus#e1b866Focus ring, selected controls, active platform markers
--active#e1b866Active navigation, selected cover borders, Big Box cover borders
--action#d7a34aLaunch action (Play button), primary dialog confirmations
--action-ink#1c160dDark text inside the amber action surface
--white#ffffffOccasional pure white highlights
--cyan#72c9d4Teal accent (defined in :root but not consumed by the base stylesheet)
--green#8fbd8dMuted sage (defined in :root but not consumed by the base stylesheet)
--gold#e5b65cAchievement/gold signal
--rating#f0bd63Rating star signal
--launch-shadow#d7a34a44Shadow tint under the Play button
--danger#743f3fError/destructive state
--empty-action#d7a34aEmpty-state action buttons
--mark-start#f0c36aProgress/milestone accent start
--mark-end#ba593dProgress/milestone accent end
--mark-ink#1c160dText inside milestone fills
--cover-title-start#51412dCover gradient start tone
--achievement#e8ba55RetroAchievements badge, achievement points
--lifecycle-bg#45351dSession lifecycle overlay background
--lifecycle-kicker#f0c36aLifecycle kicker accent
--bigbox-bg#30261aBig Box cover backdrop
--bigbox-copy#d0c0a5Big Box secondary text

State-color rule

Amber (#e1b866 / #d7a34a) identifies both where the user is focused and where the user can launch or is actively playing. The base stylesheet does not split these roles across two hue families the way earlier DESIGN.md text described. If you author a theme that does split focus from launch, keep the two roles visually distinct and never make launch read as a destructive or muted state.

Typography

The base stack is ui-sans-serif, system-ui, sans-serif (no bundled webfont in the base stylesheet). Font sizes come from --font-* variables.

TokenValueUse
--font-micro9pxTiny counters, badge numbers
--font-label11pxSection labels, field labels, nav categories
--font-meta12pxRelease year, region tags, auxiliary metadata
--font-body-small13pxInline hints, status chips
--font-body14pxDefault application copy, form content
--font-action15pxButton labels, chip text
--font-dialog16pxDialog body
--font-title-large18pxGame card titles
--font-heading24pxSection headings
--font-brand0.9375remApp title strip, breadcrumbs
--font-nav0.8125remTopbar menu items, sidebar row labels
--font-subtitle19pxDialog section headers
--font-bigbox21pxBig Box body
--font-panel-title28pxBig Box panel headers
--font-bigbox-displayclamp(38px,5vw,72px)Big Box headings
--font-screensaverclamp(44px,8vw,110px)Screensaver statements

The lifecycle overlay uses a hardcoded clamp(34px,6vw,78px) rather than a --font-* variable.

Stock themes may replace the entire stack: Midnight Circuit uses Syne + Manrope, Phosphor Terminal uses IBM Plex Mono + Share Tech Mono, Harbor Light uses Sora + Literata, Cinema Marquee uses Bebas Neue + Source Sans 3, and Nordic Mist uses Outfit + Fraunces.

Spacing

The base stylesheet does not expose --sp-* variables; spacing is hardcoded in each rule. Common values: 2px for hairline gaps, 6px for checkbox margins, 8px for input padding, 12px for card padding, 16px for column gaps, and 25px for wide form grids. When you add custom CSS, derive spacing from the nearest value already used in index.html rather than inventing new units.

Rounded corners

Only four radius variables exist. Other radii are hardcoded in the rules that use them.

TokenValueApplies to
--radius-hairline2pxThin decorative lines, narrow separators
--radius-cover5pxGame cover art containers
--radius-panel12pxBig Box panels, large panels
--radius-pill-large28pxBig Box play/pill buttons

Hardcoded values in the base: inputs use 4px (some 3px), cards and detail panels use 6px to 8px, dialogs use 8px, the Play button uses 18px (pill).

Layout

The shell is a three-column workspace with responsive breakpoints:

BreakpointSidebarLibraryDetail Pane
Default190pxminmax(520px, 1fr)410px
≤ 1100px150px1fr340px
≤ 760pxStacked above libraryStackedStacked below grid

Cover grid

Auto-filled columns with a minimum cover width of 132px (105px at ≤ 1100px, 100px at ≤ 760px). Covers keep the aspect ratio of each image: portrait, square, and landscape box art all render uncropped. Games without artwork fall back to a portrait 0.72 box with the title centered. The default grid gap is 20px 16px (row then column); the sticky header keeps collection title, sort, image group, and view actions visible while the grid scrolls.

Big Box compositions

LayoutComposition
StageOne large cover + description + big Play button; controller footer hints
HybridPlatform rail on left + games + scoped search field
CoverFlowHorizontal jewel-case cover strip; active cover straightens and scales

Shadows

Depth comes from tonal layering first, shadows second. The real values in the base stylesheet:

ContextValue
Cover lift0 8px 18px #0007
Cover (Cinema Marquee theme)0 14px 32px #000a
Dialog depth0 30px 80px #000c
Big Box cover0 0 0 6px #e1b86622, 0 40px 90px #000c
Play button0 5px 14px var(--launch-shadow)

Hover and selection add an amber separation border plus stronger lift. The selected cover uses a cyan-family halo only in the historical DESIGN.md; the shipped base uses amber (--active).

Component specs

Buttons

VariantBackgroundText colorRadiusPadding
Launch (Play)var(--action)#d7a34avar(--action-ink)#1c160dPill (18px)10px
Primaryvar(--action)#d7a34avar(--action-ink)4px9px 16px
Secondaryvar(--surface-field)#27231evar(--text)4px(rule-specific)

Hover shifts secondary toward a lighter raised surface. Focused controls gain a 2px focus border (var(--focus)) plus a one-pixel ring.

Chips and badges

Rating, status, and ESRB chips use muted text on card surfaces. Achievement signals use --achievement (#e8ba55). Badges stay subordinate to cover art and the launch action.

Cards

ElementRadiusPaddingBackground
Cover cardvar(--radius-cover) (5px)12pxGradient (#51412d#1b1814) or raised surface
Detail card6px to 8px12pxvar(--surface-card)
Big Box panelvar(--radius-panel) (12px)24px to 26pxvar(--bigbox-bg) / var(--panel)

Inputs / Fields

Fields use --surface-field background, --border-control border, 4px radius, and 7px 8px padding. On focus, the border shifts to --focus (#e1b866) and gains a one-pixel ring. Disabled actions reduce opacity and show not-allowed cursor. No separate error palette exists in the base system; errors reuse the standard flow with a textual message rather than a colored field.

Navigation

Topbar items are borderless and transparent at rest, gaining a raised background on hover. Active platform rows use a darker panel tone with a small amber marker dot. Inactive navigation is muted and transparent. The rail scrolls horizontally; the workspace columns tighten at 1100px and stack below 760px.

Big Box specifics

Big Box reuses the palette and typography tokens, then scales them:

  • Titles use --font-bigbox-display (clamp 38-72px) and the screensaver uses --font-screensaver (clamp 44-110px).
  • Controller footer hints use the --font-label weight mapped to the currently pressed button.
  • Jewel-case perspective on CoverFlow uses CSS transforms, not asset files.
  • Background music (library_music setting path) plays under covers; video_bgm_mix lowers volume when video audio is present.

Light theme note

Harbor Light is the only bundled light theme. It overrides --bg, --panel, --panel2, --line, --text, --muted, --cyan, --green, --accent, and --danger with paper tones, but the base stylesheet does not define a --accent variable or a --sl-color-* token set. Those names are theme-local, not part of the base contract. If you author a light theme, ensure --focus, --active, --action, and --action-ink remain legible against your light surfaces and that text contrast stays at least 4.5:1.

Related

  • Themes for the five stock CSS themes and the import workflow
  • How OpenBoxGL works for how tokens render at runtime
  • index.html in the application repository for the authoritative :root block