⌘K

Front-End CSS Tokens

render_header_scripts() loads a bundled system stylesheet (assets/css/synaptikCSS.php, combining the search overlay, shortcode, and gallery-layout CSS) on pages that need it. That stylesheet is intentionally theme-agnostic — it reads its colors, spacing, and typography from CSS custom properties, which your theme's style.css is expected to define.

Every token below now has a built-in fallback value. A theme defining none of them still renders a coherent, working dark-ish default — not an invisible or broken-color UI element. tests/Unit/CssFallbackTest.php parses all three stylesheets and fails the build if any var(--token) usage is missing a fallback (with two narrow, deliberate exceptions noted below), and tests/Unit/ThemeContractTokensTest.php locks in that theme/starter/css/style.css still declares the full reference set. Skipping the tokens below is never a hard error; it's purely a "does it match your brand" question.

gallery-layout.css's name is legacy and slightly misleading — the same stylesheet also styles collapsible/tabbed sections (.c-col, .tab-group), not only gallery grids.

Chained fallbacks — define a handful of general tokens, get everything

Most of the niche, component-specific tokens below fall back to a general-purpose token first, and only then to a hardcoded literal — the same way a CSS cascade already works, just one level deeper:

--search-accent: var(--color-primary, #2e7d46);
--search-accent-light: var(--color-primary-light, #4fa75c);
--search-radius: var(--border-radius-sm, 6px);
--color-background-secondary: var(--bg-accent, rgba(255,255,255,.05));
--color-text-primary: var(--text-main, #eee);
--color-text-secondary: var(--text-secondary, #9fb0a5);
--tab-color: var(--color-primary, #4fa75c);

In practice this means defining --color-primary, --color-primary-light, --border-radius-sm, --bg-accent, --text-main, and --text-secondary in your theme's :root already gets the search overlay and gallery/collapsible styling looking coherent with the rest of your design — without learning or setting a single search- or gallery-specific variable name. A theme that wants the search bar colored differently from its main accent still can, by defining the niche token directly: it wins over the chained fallback, exactly like any other CSS cascade.

Nothing was renamed and nothing was removed to make this work — every token that existed before still works exactly as before if you already defined it.

Core tokens (shortcodes, general admin-style borrowing)

TokenFallbackUsed for
--color-primary#4fa75cAccent color across the TOC, quotes, buttons, callout borders — and the general fallback source for --search-accent/--tab-color
--color-primary-light#61ce70Hover states — and the fallback source for --search-accent-light
--color-secondary#4f8aa7Secondary accents
--color-warning#c05656Warning-styled callouts
--bg-darker#161815Backgrounds for the TOC box and similar inset elements; also read by gallery-layout.css
--text-mainVaries by elementBody text inside system components; fallback source for --color-text-primary
--text-secondary#666 (search.css) / #9fb0a5 (gallery-layout.css)De-emphasized text; fallback source for --color-text-secondary
--font-headings'Saira Extra Condensed', sans-serifHeadings inside system components (the TOC label, etc.)
--border-radius-sm4px (shortcodes) / 6px (search radius fallback)Corner rounding; fallback source for --search-radius
--transition-fast0.2s easeHover/interaction transitions
--space-xs / --space-sm / --space-md / --space-lg5px / 10px / 20px / 30pxConsistent spacing scale
--font-size-xs / --font-size-sm0.7em / 0.875remSmall print inside system components

Naming here is inconsistent (four different prefixes for what is conceptually one set of tokens) — an existing inconsistency in core, not something your theme needs to fix. Just define the ones you want to customize; everything else falls back.

TokenFallbackUsed for
--bg-accentrgba(255,255,255,.08)Gallery/collapsible surface background; fallback source for --color-background-secondary
--color-background-secondaryvar(--bg-accent, …)Chained — see above
--color-border-tertiaryrgba(255,255,255,.08)Borders on gallery/collapsible elements — no general-purpose equivalent to chain to
--color-text-primaryvar(--text-main, #eee)Chained — see above
--color-text-secondaryvar(--text-secondary, #9fb0a5)Chained — see above
--tab-colorvar(--color-primary, #4fa75c)Active tab indicator, chained since before the general #2 pass
--transition-normal0.3s easeGallery/collapsible transitions — no general-purpose equivalent
--c-bg / --c-color(none — see below)Per-collapsible accent color, set inline by the editor on the .c-col element itself

--c-bg/--c-color are deliberately exempt from the fallback rule: .c-col sets them on itself (an inline style="--c-color:…" from the editor's per-collapsible color picker), so they're never read from a theme's :root in the first place — a :root fallback for them would be dead code.

Search overlay tokens (search.css)

TokenFallbackUsed for
--search-text#ffffffSearch overlay text
--search-accentvar(--color-primary, #2e7d46)Active/focused state accent
--search-accent-lightvar(--color-primary-light, #4fa75c)Hover states
--search-accent-dark#235c35Pressed/active-darker states — no general-purpose equivalent
--search-overlay-bgrgba(10, 15, 12, 0.92)Full-screen overlay backdrop
--search-card-bg / --search-card-bg-hover#1c261f / #24312aResult card background
--search-checkbox-border#4a5850Filter checkbox border
--search-radiusvar(--border-radius-sm, 6px)Corner rounding on the overlay and cards
--search-section-heading#9fb0a5Section labels inside results
:root {
    /* Minimum you actually need to customize, thanks to chaining */
    --color-primary: #4fa75c;
    --color-primary-light: #61ce70;
    --border-radius-sm: 4px;
    --bg-accent: rgba(255,255,255,.08);
    --text-main: #eee;
    --text-secondary: #9fb0a5;

    /* Only if you want these to differ from the chained defaults above */
    --search-accent-dark: #235c35;
    --search-overlay-bg: rgba(10, 15, 12, .92);
    --search-card-bg: #1c261f;
    --search-card-bg-hover: #24312a;
    --search-checkbox-border: #4a5850;
    --search-section-heading: #9fb0a5;
}

Where to define them

Set these once, at :root level, in your theme's css/style.css — the same file you're already writing for everything else. There's no separate registration step; the system stylesheet simply reads whatever is in scope by the time it renders. theme/starter/css/style.css defines the full reference set and is the one tests/Unit/ThemeContractTokensTest.php checks against.

ℹ️

Callout classes emitted by the shortcode system use single dashes (sc-callout-info, sc-callout-body) — see the callout warning in Shortcodes if you're styling them yourself instead of relying on the bundled defaults.