Throttle Builder · Site settings

Theme and custom CSS

The Theme tab of Site sets the look of every page at once: colours, fonts, corners and spacing. Below it, Custom CSS lets you add your own styles to the store. The tab has a live preview of the store as you change it.

The Theme tab of the Site screen
The Theme tab of the Site screen

Presets

A preset sets every colour, font and corner at once. There are three: Clean, Editorial and Bold. Pick one to start, then change what you like. Once you change a colour or a font, the theme is customized and your values are used instead of the preset's. Picking another preset then asks first: Replace my changes or Keep mine. Reset to preset throws your changes away.

Colours

The store has a Light palette and a Dark palette, each with the same 14 colours. Switch between them at the top of Colours. The tab warns when text and its background are under a 4.5:1 contrast ratio, the level that reads comfortably.

ColourSettingCSS variable
Primary (buttons and links)colorPrimary--tb-color-primary
Text on primarycolorPrimaryForeground--tb-color-primary-foreground
Page backgroundcolorBackground--tb-color-background
Cards and panelscolorSurface--tb-color-surface
TextcolorForeground--tb-color-foreground
Muted backgroundcolorMuted--tb-color-muted
Muted textcolorMutedForeground--tb-color-muted-foreground
BorderscolorBorder--tb-color-border
Input borderscolorBorderControl--tb-color-border-control
AccentcolorAccent--tb-color-accent
SalecolorSale--tb-color-sale
SuccesscolorSuccess--tb-color-success
WarningcolorWarning--tb-color-warning
ErrorcolorDanger--tb-color-danger

A component's colour option takes either one of these theme colours or a fixed hex colour. A theme colour follows the palette, so it changes in dark mode; a hex colour does not.

Fonts, corners and spacing

SettingValues
Heading, body and mono fontsOne font each, from the list below.
Corner radius0 to 32 px. Applies to buttons, cards, inputs and images.
SpacingCompact, comfortable or roomy. Scales every spacing step (xs to 2xl) of the store.
Colour schemeLight, Dark, or Match the shopper (follow each shopper’s device).
KindFonts
SerifInstrument Serif, Playfair Display, Lora, Merriweather, Cormorant Garamond, EB Garamond, Libre Baskerville, Source Serif 4, Fraunces, DM Serif Display
SansInter, Schibsted Grotesk, DM Sans, Manrope, Poppins, Montserrat, Work Sans, Rubik, Nunito Sans, Open Sans, Lato, Raleway, Outfit, Plus Jakarta Sans, Figtree, Karla
MonoDM Mono, JetBrains Mono, IBM Plex Mono, Space Mono
DisplayBebas Neue, Oswald, Archivo Black, Space Grotesk, Syne
Systemsystem-sans, system-serif, system-mono (the visitor’s own fonts, nothing to download)

Custom CSS

Custom CSS applies to your store pages, never to checkout. It is one stylesheet for the whole site, and it is not scoped: a rule can reach any element of the store pages. Use theme variables so presets and dark mode keep working.

The Custom CSS card under the fonts settings: the No problems status, Format, Reset to published, Save CSS and the code editor
The Custom CSS card under the fonts settings: the No problems status, Format, Reset to published, Save CSS and the code editor

The editor is a code editor built for this:

  • Highlighting and suggestions. Press Ctrl Space for suggestions: the store's theme variables with their current values, and the CSS class names your pages, header and footer use.
  • Lint. Problems show as you type, with their line; Go to line jumps there. A variable your site does not set is a warning: it falls back to the property's default.
  • Format. Shift Alt F tidies the stylesheet.
  • Live preview. 300 ms after you stop typing, the preview takes the new CSS, as long as it has no errors.
  • Save. Cmd or Ctrl S saves to the draft. A stylesheet with errors is not saved: fix them first. Publish the site to put it live.
Custom CSS
/* Use theme variables, so presets and dark mode keep working */
.hero-title {
  color: var(--tb-color-primary);
  letter-spacing: -0.02em;
}

@media (max-width: 767px) {
  .hero-title { font-size: 2rem; }
}

Custom CSS rules and limits

The stylesheet is checked before it is saved, and any problem refuses the whole sheet, so a store never gets half a stylesheet. The rules keep the stylesheet from loading anything or running code:

RuleDetails
SizeUp to 256 KB (262,144 bytes).
At-rulesOnly @media, @supports and @keyframes. @import, @font-face and every other at-rule are refused. At-rules nest 4 deep at most.
Media queriesWidths in px, em or rem, plus prefers-reduced-motion, prefers-color-scheme, hover and pointer.
url()Only an absolute https address on your store’s media origin (an image from Media), with no query or fragment, or a small data:image/svg+xml (4 KB at most).
FunctionsThe usual value functions are allowed: var, calc, min, max, clamp, colour functions (rgb, hsl, oklch, color-mix, light-dark and more), gradients, transforms, filters, shapes and counters. Functions that load a resource or run code (image-set, image, cross-fade, element, paint, src, expression) are refused.
PropertiesAny property and any custom property (--name), except behavior and binding.
SelectorsElements, classes, ids, :has, :not, :is, :where, :nth-*(An+B) and pseudo-elements. Attribute selectors only on data-*, aria-*, role, type, hidden, open and disabled.
TextPrintable ASCII outside comments and strings; no backslash escapes in names or url(); no <!-- or -->; no javascript: or expression( in strings.

Each refusal names its line and column and a stable code, such as SITE_CSS_AT_RULE, SITE_CSS_URL, SITE_CSS_URL_ORIGIN, SITE_CSS_FUNCTION, SITE_CSS_PROPERTY, SITE_CSS_SELECTOR, SITE_CSS_ESCAPE, SITE_CSS_SYNTAX or SITE_CSS_TOO_LARGE.

Who can edit it
Anyone who can edit the site can change custom CSS; others see it read only. An AI agent sets it as theme.customCss with update_site_settings, and the same rules apply.

Related