:root selector. Two files publish them:
layout/theme.liquid— emits tokens driven bysettings_schema.json, so the merchant’s Theme Editor choices become CSS variables at render time.assets/styles.css— emits the literal fallback tokens that ship with the theme, used when a setting hasn’t been customized.
var(--token). Editing a setting in the Theme Editor recompiles theme.liquid and updates the variable globally — no other file needs to change.
From theme.liquid (merchant-driven)
These tokens are emitted dynamically based on the merchant’s settings.
Brand palette
Color schemes
Functional colors
Legacy aliases
These are aliases retained so older component CSS continues to work while the codebase migrates to the new scheme system.Typography
Buttons
Layout
From styles.css (literal fallback)
These tokens are emitted unconditionally in the stylesheet. They serve as the floor — what every component falls back to when a settings-driven token is undefined.
Brand palette (legacy)
Hairlines
Layout (literal)
Typography (literal)
Motion
Image-slot component
The image-slot component (used for inline placeholders) defines its own token set:Grid utility
Token resolution order
When a component readsvar(--ink), the browser walks the cascade in this order:
- Inline style — any element with
style="--ink: ..."overrides everything below. <style>intheme.liquid—:root { --ink: {{ settings.color_primary | default: '#002F5B' }}; }emitted on every request.assets/styles.css—:root { --ink: #002F5B; }shipped with the theme.
color_primary in the Theme Editor instantly updates every component on the storefront, while styles.css keeps shipping a literal default for any token the schema doesn’t bind.
Dark mode
Voyager’s dark mode is opt-in via thedata-theme="dark" attribute on <html>. When set, the --surface and --ink tokens flip:
The dark-mode toggle is hidden by default in
theme.liquid. Merchants can expose it by adding a toggle button to the header.
What’s next
Theme settings
The merchant-facing settings that drive these tokens.
JavaScript API
The data-attribute hooks and global functions.