Theme system
A template's look comes from three places: branding in template.json (turned into CSS custom properties), the shared stylesheets (core.css always, kit.css when assets.kit is true) and your own stylesheet.
Branding → CSS custom properties
Colours, fonts and corner radius. Exposed to the browser as config.branding and converted into CSS custom properties in a <style id="sf-theme-tokens"> tag that core.css / kit.css (and your CSS) can use. store/theme-assets.js:61 server.js:768
| template.json | CSS property | Format | Description | Source |
|---|---|---|---|---|
branding.primaryColor | --sf-primary | color^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ | Main brand colour. Also the default SweetAlert2 confirm-button colour when script.js sets no buttonColor. Sets the CSS custom property --sf-primary (hex colours only; anything else is ignored). | store/theme-assets.js:64 |
branding.secondaryColor | --sf-secondary | color^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ | Secondary colour. Sets the CSS custom property --sf-secondary (hex colours only; anything else is ignored). | store/theme-assets.js:65 |
branding.accentColor | --sf-accent | color^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ | Accent colour. Sets the CSS custom property --sf-accent (hex colours only; anything else is ignored). | store/theme-assets.js:66 |
branding.textColor | --sf-ink | color^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ | Body text colour. Sets the CSS custom property --sf-ink (hex colours only; anything else is ignored). | store/theme-assets.js:67 |
branding.surfaceColor | --sf-surface | color^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ | Card / panel background. Sets the CSS custom property --sf-surface (hex colours only; anything else is ignored). | store/theme-assets.js:68 |
branding.mutedSurfaceColor | --sf-muted-surface | color^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ | Muted background for alternate sections. Sets the CSS custom property --sf-muted-surface (hex colours only; anything else is ignored). | store/theme-assets.js:69 |
branding.onPrimaryColor | --sf-on-primary | color^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ | Text colour on top of the primary colour. Sets the CSS custom property --sf-on-primary (hex colours only; anything else is ignored). | store/theme-assets.js:70 |
branding.fontFamily | --sf-font-body | font-stack^[A-Za-z0-9 ,'"-]{1,160}$ | Body font stack. Sets --sf-font-body. Must match ^[A-Za-z0-9 ,'"-]{1,160}$ (no url() or semicolons). | store/theme-assets.js:71 |
branding.headingFont | --sf-font-heading | font-stack^[A-Za-z0-9 ,'"-]{1,160}$ | Heading font stack. Sets --sf-font-heading. | store/theme-assets.js:72 |
branding.displayFont | --sf-font-display | font-stack^[A-Za-z0-9 ,'"-]{1,160}$ | Display font stack. Sets --sf-font-display. | store/theme-assets.js:73 |
branding.radius | --sf-radius | string^\d{1,2}px$ | Corner radius such as "8px" (1–2 digits + px). Sets --sf-radius. | store/theme-assets.js:74 |
Use them in styles.css, e.g. .btn-primary { background: var(--sf-primary); }. The Studio's Theme panel edits these values and shows them live in the preview.
Fonts
Fonts are self-hosted by the application. List keys in assets.fonts; the page loads /assets/fonts/<key>.css. External font services are blocked by the CSS sanitizer and the CSP.
| Key | Family | Weights | Stylesheet |
|---|---|---|---|
albert-sans | Albert Sans | 100 900 | /assets/fonts/albert-sans.css |
cormorant-garamond | Cormorant Garamond | 300 700 | /assets/fonts/cormorant-garamond.css |
exo | Exo | 100 900 | /assets/fonts/exo.css |
forum | Forum | 400 | /assets/fonts/forum.css |
fraunces | Fraunces | 100 900 | /assets/fonts/fraunces.css |
inter | Inter | 100 900 | /assets/fonts/inter.css |
jost | Jost | 100 900 | /assets/fonts/jost.css |
manrope | Manrope | 200 800 | /assets/fonts/manrope.css |
nunito | Nunito | 200 1000 | /assets/fonts/nunito.css |
pacifico | Pacifico | 400 | /assets/fonts/pacifico.css |
playfair-display | Playfair Display | 400 900 | /assets/fonts/playfair-display.css |
pt-sans | PT Sans | 400, 700 | /assets/fonts/pt-sans.css |
roboto | Roboto | 100 900 | /assets/fonts/roboto.css |
rubik | Rubik | 300 900 | /assets/fonts/rubik.css |
Layout kit
true loads /assets/storefront/kit.css (the layout kit used by the newer templates). store/theme-assets.js:88 Installed templates using it: beauty, boutique, corporate, couture, electro, grocer, homeliving, organic.
Words (labels)
The storefront engine's words. Override any of them in template.json labels or in script.js window.StorefrontTheme.labels (template.json wins).
| Label | Default |
|---|---|
cart | Cart |
cartLower | cart |
addToCart | Add to Cart |
viewCart | View Cart |
wishlist | Wishlist |
wishlistLower | wishlist |
saveItem | Save |
brand | Brand |
brands | Brands |
allBrands | All Brands |
shopByBrand | Shop by Brand |
product | Product |
products | Products |
browseProducts | Browse Products |
category | Category |
categories | Categories |
emptyCartTitle | Your cart is empty |
emptyCartText | Browse the store and add something you love. |
emptyWishlistTitle | Nothing saved yet |
emptyWishlistText | Tap the heart on any product to keep it here. |
continueShopping | Continue Shopping |
checkout | Checkout |
delivery | Delivery |
storeWord | store |
chooseStoreTitle | Choose your store |
chooseStoreText | Prices, availability and delivery options depend on the store you shop from. |
currencyIcon | fa-shopping-bag |
Icons
| Icon | Default Font Awesome class |
|---|---|
cart | fa-shopping-cart |
wishlist | fa-heart |
emptyCart | fa-shopping-basket |
browse | fa-store |
categoryDefault | fa-tag |
brand | fa-award |
Category tiles pick an icon by keyword (67 keywords built in, e.g. vegetable, fruit, grain, dairy, milk, meat, fish, seafood); add more with StorefrontTheme.categoryIcons.