Theme reference
Package
Section titled “Package”manifest.json id, name, version, author, description, themeApi, mode, triggers (optional), licensetheme.csspreview.png up to 512 KBassets/ flat folder: woff2, woff, png, jpg, webp, gif, svg| Rule | Detail |
|---|---|
id |
2 to 40 lowercase letters, digits, hyphens. Immutable. Selector: [data-theme-set='<id>']. |
version |
x.y.z, strictly increasing |
| SVG assets | No script, event handlers, foreignObject or external references |
| Limits | 4 MB packaged, 16 MB unpacked, 64 files |
Style with the variables and data-sw hooks only ([data-sw~="button"]), never class names like .btn, which change without notice. A dark theme needs a dark --bg, which also selects the globe’s map tiles. See the Theme reference. A worked example is scripts/example-theme in the app repository.
Stable surface
Section titled “Stable surface”- Variables: set on
:root[data-theme-set='<id>']. - Hooks:
data-swattributes, selected word-match, for example[data-sw~="button"]. An element can carry several.
Everything else (class names such as .btn and .card, page structure, element order) is internal and changes without notice. Don’t select on it.
Variables
Section titled “Variables”| Variable | Group | What it is |
|---|---|---|
--bg |
Colours | The page background. Its brightness decides whether the dashboard globe uses light or dark map tiles, so keep it meaningful. |
--bg-elev |
Colours | Cards, panels and the sidebar: one step above the page. |
--bg-elev-2 |
Colours | Inputs, table headers and hovered rows: two steps above the page. |
--border |
Colours | Ordinary borders and dividers. |
--border-strong |
Colours | Emphasised borders: focused fields, selected items. |
--text |
Colours | Body text and headings. |
--text-dim |
Colours | Secondary text: captions, table headers, hints. |
--text-faint |
Colours | Tertiary text: placeholders, disabled text, timestamps. |
--accent |
Colours | The brand colour: links, primary buttons, the active navigation item. An instance may override it from the hosting panel. |
--accent-strong |
Colours | The accent when pressed or hovered. |
--accent-ink |
Colours | Text drawn on top of –accent (the label of a primary button). |
--good |
Status colours | Success: confirmations, a contact that scored, a healthy status. |
--warn |
Status colours | Warnings and notes. |
--bad |
Status colours | Errors, dupes, destructive buttons. |
--purple |
Status colours | A fourth accent used for data modes and some badges. |
--radius |
Shape | Corner radius of cards, panels and dialogs. |
--radius-sm |
Shape | Corner radius of buttons, inputs and chips. |
--shadow |
Shape | The shadow under raised surfaces (a full box-shadow value). |
--font |
Type | The interface font stack. A theme may add its own @font-face from its package and name it here. |
--mono |
Type | The monospace font stack: callsigns, frequencies, times, exchanges. |
--nav-h |
Layout | Height of the top bar on narrow screens. |
--sidebar-w |
Layout | Width of the sidebar on wide screens. |
--glass-bg |
Glass | Background of the translucent panels over the dashboard globe. |
--glass-border |
Glass | Border of the translucent panels. |
--glass-highlight |
Glass | The inner top highlight of a translucent panel (transparent turns it off). |
--glass-shadow |
Glass | The shadow under a translucent panel. |
--duration-spring-snappy |
Motion | Duration of small, frequent transitions (button release, sidebar collapse). |
--ease-spring-snappy |
Motion | Easing of the small transitions. |
--duration-spring-smooth |
Motion | Duration of larger reveals (a toast, the mobile drawer). |
--ease-spring-smooth |
Motion | Easing of the larger reveals. |
--map-have |
Maps and radio | Region maps: a region already worked. |
--map-need |
Maps and radio | Region maps: a region still needed. |
--map-need-hot |
Maps and radio | Region maps: a needed region that is on the air right now. |
--map-none |
Maps and radio | Region maps: a region that does not count. |
--p1 |
Maps and radio | Priority colour 1 (highest) in the spot queue. |
--p2 |
Maps and radio | Priority colour 2. |
--p3 |
Maps and radio | Priority colour 3. |
--cmap-h |
Layout | Height of the contest region map. Themes should leave this alone; it is listed because the app sets it per screen size. |
Spacing is not a variable in API version 1. The app lays itself out with fixed spacing; a theme that needs different spacing uses the hooks.
| Hook | Where it is |
|---|---|
[data-sw~="shell"] |
The whole signed-in layout: sidebar and page together. |
[data-sw~="sidebar"] |
The navigation sidebar (wide screens, and the drawer on narrow ones). |
[data-sw~="nav-item"] |
One navigation entry in the sidebar. |
[data-sw~="nav-indicator"] |
The highlight that slides behind the active navigation item. |
[data-sw~="brand"] |
The block at the top of the sidebar or bar: the logo, the instance name and the club callsign. |
[data-sw~="instance-name"] |
The instance name itself, inside the brand block. |
[data-sw~="header"] |
The top bar on narrow screens. |
[data-sw~="app-info"] |
The version and credit text at the foot of the sidebar. |
[data-sw~="main"] |
The page area to the right of the sidebar. |
[data-sw~="page-head"] |
A page title row (title on the left, actions on the right). |
[data-sw~="card"] |
A bordered panel. Most screens are made of cards. |
[data-sw~="card-title"] |
The heading of a card. |
[data-sw~="button"] |
Every button, including primary, ghost and icon buttons. |
[data-sw~="field"] |
A labelled form field (the label and its input together). |
[data-sw~="pill"] |
A small rounded status label. |
[data-sw~="chip"] |
A small rounded tag, for example a multiplier marker. |
[data-sw~="alert"] |
An inline message box (success, error, warning, information). |
[data-sw~="tabs"] |
A row of tabs. |
[data-sw~="table"] |
A data table and its scrolling wrapper (the log books, statistics, admin lists). |
[data-sw~="stat"] |
One statistic tile. |
[data-sw~="toast"] |
A transient confirmation message. |
[data-sw~="tooltip"] |
The hover tooltip. |
[data-sw~="scrim"] |
The dimmed layer behind a dialog or the mobile drawer. |
[data-sw~="signin"] |
The signed-out screens: the frame around sign in, sign up, invite and reset. |
[data-sw~="dashboard"] |
The dashboard: the globe and its overlays. |
[data-sw~="dashboard-panel"] |
A translucent panel over the globe. |
[data-sw~="globe"] |
The globe itself. |
[data-sw~="entry-form"] |
The contest entry form. |
[data-sw~="entry-pane"] |
One pane of the contest entry form (the fields typed every contact, and the collapsible rest). |
[data-sw~="spot-queue"] |
The queue of spots on the contest screen. |
[data-sw~="spot"] |
One spot: the large card in the contest queue and the compact line elsewhere. |
[data-sw~="reference-card"] |
The Reference card: calling and hunting scripts, phonetics and the band plan. |
[data-sw~="reference-strip"] |
The live band strip inside the Reference card. |
[data-sw~="band-bar"] |
The band bar with the radio’s frequency marker. |
[data-sw~="radio-pill"] |
The radio status in the header. |
[data-sw~="profile-menu"] |
The member menu opened from the profile picture. |
--bg selects light or dark map tiles for the dashboard globe from its brightness, so a dark theme needs a dark --bg. Night-Ops is built in, themes may ignore it, and members can still choose it.
The package format, what the install checks, and how to preview and publish are on Importing custom themes.