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 every page. 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. Skipping them isn't a hard error; most fall back to a dark/green default, but a few genuinely need a real value from your theme to look right.
Core tokens (with fallback defaults)
| Token | Fallback | Used for |
|---|---|---|
--color-primary | #4fa75c | Accent color across the TOC, quotes, buttons, callout borders |
--color-primary-light | #61ce70 | Hover states on primary-colored elements |
--color-secondary | #4f8aa7 | Secondary accents |
--bg-darker | #161815 | Backgrounds for the TOC box and similar inset elements |
--text-main | Varies by element | Body text inside system components |
--text-secondary | #666 | De-emphasized text |
--color-warning | #c05656 | Warning-styled callouts |
--font-headings | 'Saira Extra Condensed', sans-serif | Headings inside system components (the TOC label, etc.) |
--border-radius-sm | 4px | Corner rounding on boxes |
--transition-fast | 0.2s ease | Hover/interaction transitions |
--space-xs / --space-sm / --space-md / --space-lg | 5px / 10px / 20px / 30px | Consistent spacing scale |
--font-size-xs | 0.7em | Small print inside system components |
Search overlay tokens (no fallback — define these yourself)
Unlike the tokens above, these have no built-in default — the search overlay (Ctrl+K) will still function without them, but its colors are left entirely up to whatever inherits from the surrounding page, which usually looks unstyled or mismatched:
--search-bg, --search-text, --search-accent, --search-accent-light, --search-accent-dark, --search-overlay-bg, --search-card-bg, --search-card-bg-hover, --search-checkbox-border, --search-radius, --search-section-heading.
:root {
--search-bg: #1a1d1a;
--search-text: #eee;
--search-accent: var(--color-primary);
--search-accent-light: var(--color-primary-light);
--search-overlay-bg: rgba(10, 12, 10, .92);
--search-card-bg: #23261f;
--search-card-bg-hover: #2c3025;
--search-radius: 8px;
}
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.
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.
