Skip to main content

Palette

The storefront injects 22 merchant-configurable colors as CSS custom properties on :root. Use these variables in your style.css so merchants can change colors from the admin panel without editing your theme files.

CSS variables

Names use hyphens and a -- prefix. Each variable maps to a specific UI area:

CSS variablePurpose
--hd-bgHeader background
--hd-textHeader text color
--ann-bgAnnouncement bar background
--ann-textAnnouncement bar text
--ft-bgFooter background
--ft-textFooter text color
--buy-btn-bgBuy / add-to-cart button background
--buy-btn-textBuy button text
--buy-btn-borderBuy button border
--crt-btn-bgCart button background
--crt-btn-textCart button text
--crt-btn-borderCart button border
--product-name-textProduct name text color
--product-price-textProduct price text color
--product-sale-price-textProduct sale price text color
--body-bgSite/app background
--body-textBase body text
--input-borderInput border (normal + focus)
--input-bgInput background
--input-textInput text
--checkout-form-bgCheckout form/card background
--checkout-heading-textCheckout heading text

Using palette variables in CSS

warning

Always provide fallback values in var(...) so your theme keeps a usable color palette if a variable is missing or empty.

.my-header {
background-color: var(--hd-bg, #1a1a2e);
color: var(--hd-text, #ffffff);
}

.my-announcement {
background-color: var(--ann-bg, #e94560);
color: var(--ann-text, #ffffff);
}

.my-footer {
background-color: var(--ft-bg, #16213e);
color: var(--ft-text, #e2e2e2);
}

.buy-button {
background-color: var(--buy-btn-bg, #e94560);
color: var(--buy-btn-text, #ffffff);
border: 1px solid var(--buy-btn-border, #e94560);
}

.cart-button {
background-color: var(--crt-btn-bg, #0f3460);
color: var(--crt-btn-text, #ffffff);
border: 1px solid var(--crt-btn-border, #0f3460);
}

.product-name {
color: var(--product-name-text, #212a2f);
}

.product-price {
color: var(--product-price-text, #212a2f);
}

.product-price-sale {
color: var(--product-sale-price-text, #c94a4a);
}

body {
background-color: var(--body-bg, #ffffff);
color: var(--body-text, #131316);
}

.checkout-form .global_input {
border: 1px solid var(--input-border, rgba(0, 0, 0, 0.08));
background: var(--input-bg, #ffffff);
color: var(--input-text, #212a2f);
}

.checkout-form .global_input:focus {
border-color: var(--input-border, rgba(0, 0, 0, 0.08));
}

.checkout-form {
background: var(--checkout-form-bg, #f5f4f2);
}

.checkout-form h2 {
color: var(--checkout-heading-text, #212a2f);
}
tip

Prefer these variables over hard-coded colors so merchants can tune product text, site background, inputs, and checkout UI from the dashboard.

Runtime behavior

On load, the storefront applies values on :root, for example:

<style>
:root {
--hd-bg: #1a1a2e;
--hd-text: #ffffff;
--ann-bg: #e94560;
--ann-text: #ffffff;
--ft-bg: #16213e;
--ft-text: #e2e2e2;
--buy-btn-bg: #e94560;
--buy-btn-text: #ffffff;
--buy-btn-border: #e94560;
--crt-btn-bg: #0f3460;
--crt-btn-text: #ffffff;
--crt-btn-border: #0f3460;
--product-name-text: #212a2f;
--product-price-text: #212a2f;
--product-sale-price-text: #c94a4a;
--body-bg: #ffffff;
--body-text: #131316;
--input-border: #d9d9d9;
--input-bg: #ffffff;
--input-text: #212a2f;
--checkout-form-bg: #f5f4f2;
--checkout-heading-text: #212a2f;
}
</style>

Your style.css and script.js are still loaded globally on every page.