CSS tokens
The templates set CSS variables that follow the brand color, framework presets, the advanced colors and dark mode. Use them, and your markup matches in every theme.
Variables#
| Variable | Meaning |
|---|---|
--wcx-accent | Brand color |
--wcx-accent-soft | Brand tint |
--wcx-on-accent | Text on brand buttons |
--wcx-link | Links |
--wcx-ink | Headings and totals |
--wcx-text | Body text |
--wcx-muted | Small text |
--wcx-surface | Card background |
--wcx-tint | Soft background |
--wcx-line, --wcx-line-soft | Borders |
--wcx-ok, --wcx-ok-soft, --wcx-ok-ink | Success |
--wcx-danger, --wcx-danger-soft, --wcx-danger-ink | Errors |
--wcx-radius, --wcx-radius-s, --wcx-radius-l | Corners |
--wcx-space-s, --wcx-space-l | Spacing |
Root classes#
| Class | Page |
|---|---|
.wcck | Cart |
.wcco | Checkout |
.wcty | Thank you |
.nbwt-mc | Mini cart |
Right-to-left pages carry dir="rtl". Use logical properties such as margin-inline-start.
Add your CSS#
Append rules with the nbwt_design_css filter, so they load only where the templates load:
add_filter( 'nbwt_design_css', function ( $css ) {
return $css . '.acme-badge{background:var(--wcx-accent-soft);color:var(--wcx-accent);border-radius:var(--wcx-radius-s)}';
} ); Site owners can add CSS without code under Theme with AI and custom CSS.