Uploading a theme
Custom themes as .starsell-theme.json files - every field, the CSS rules, how the upload checks a file, versions, deleting, and exporting a store's theme to start from.
A theme file restyles one of Starsell's built-in themes (Velour, Paper or Bazaar). The built-in theme still draws every section; the file picks the fonts, the color presets, the setting defaults, the starting home page and some extra CSS.
A theme file is plain JSON and never contains code: no scripts, no templates, no HTML.
Uploaded themes belong to the organization: every store in it can use them, each at the version it picked.
Upload a theme
Open the dialog
On Online store > Themes, click Upload a theme (top of the page, or in the Uploaded themes section).
Drop the file
Drop a file on the box or click it to pick one. The file is checked straight away ("Checking" and the file name). Nothing is saved yet.
Fix problems, if any
If the file has problems, the dialog lists every one with where it is in the file, for example presets[1].palette.bg: "navy blue" is not a color. Use #RRGGBB, rgb() or hsl(). Nothing was uploaded. Fix the file and click Pick the fixed file.
Upload
A file that passes shows Checked, the theme it is based on, how many presets and starter sections it has, and how much CSS. Below that, what uploading will do: add a new theme to the organization, or add a version of a theme you uploaded before. Click Upload theme (or Upload version and the number).
The theme then shows under Uploaded themes for every store in the organization. No store changes until someone puts it in a draft and publishes.
The file
Name it <anything>.starsell-theme.json. The dialog takes .json files of up to 256 KB; zip files and theme code are refused.
{
"$comment": "Noir Lux: Velour's layout in deep plum and gold.",
"format": 1,
"id": "noir-lux",
"name": "Noir Lux",
"version": "1.0.0",
"description": "Deep plum and gold with a serif heading. Built on Velour.",
"base": "velour",
"fonts": {
"heading": "'Playfair Display', serif",
"body": "'Inter', sans-serif",
"href": "https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Inter:wght@400;500;600&display=swap"
},
"presets": [
{
"id": "plum",
"name": "Plum",
"palette": {
"bg": "#1A0F1F",
"surface": "#2A1A31",
"ink": "#F6EEE3",
"muted": "#C2B3BE",
"accent": "#D4AF6A",
"onAccent": "#1A0F1F",
"line": "rgba(255,255,255,.12)",
"glow": "rgba(212,175,106,.42)"
}
}
],
"defaults": { "radius": 4, "buttonShape": "square", "cardStyle": "card", "spacing": "roomy" },
"starter": [
{ "type": "announcement", "settings": { "text": { "en": "Gift wrapped, always discreet" } } },
{ "type": "header" },
{ "type": "afterglow_hero", "settings": { "heading": { "en": "Slow evenings, gold light." } } },
{ "type": "product_grid", "settings": { "heading": { "en": "The edit" }, "count": 8, "columns": 4 } },
{ "type": "footer" }
],
"css": "[data-section=\"afterglow_hero\"] h1 { font-style: italic; }"
}Fields
Prop
Type
Anything else in the file is refused, so a typo never goes unnoticed.
Presets
Each preset has an id (lowercase letters, digits and dashes, up to 32), a name (up to 40 characters) and a palette with all eight colors:
| Color | Used for |
|---|---|
bg | The page background |
surface | Cards and panels |
ink | Text |
muted | Secondary text |
accent | Buttons and highlights |
onAccent | Text on the accent color |
line | Borders and hairlines |
glow | Glows and soft backgrounds |
Colors are hex (#1A0F1F), rgb(), rgba(), hsl(), hsla() or a color name. Two presets can't share an id.
Defaults
The theme settings a store starts with when it puts the theme in its draft:
| Key | Values |
|---|---|
radius | 0 to 28 (px) |
pageWidth | 960 to 1600 (px) |
spacing | tight, normal, roomy |
headingScale | 80 to 130 (%) |
buttonStyle | solid, outline, glow |
buttonShape | square, rounded, pill |
cardStyle | plain, card, outlined |
imageRatio | square, portrait, tall |
quickAdd, badges, freeShippingBar | true or false |
Settings the file leaves out keep the base theme's defaults.
Starter sections
starter is the home page a store gets when it picks Theme's sections in the try dialog. type is one of the section types the Studio offers:
announcement, header, hero, product_grid, image_with_text, rich_text, instagram_feed, reviews, faq, newsletter, footer, plus the base theme's own: afterglow_hero on Velour, lookbook on Paper, deal_countdown on Bazaar.
settings uses the same keys as the section's form in the Studio, and each value is checked:
- Text can be one string, or one string per language:
{ "en": "...", "he": "..." }, using the codes of the 41 languages. Up to 4,000 characters. - Links start with
/,#orhttps://. - Photos are a file id from the store, an
https://address, or"". A list of photos holds up to 12. - Numbers stay inside the section's range, choices are one of its options, switches are
trueorfalse.
hidden: true adds the section hidden.
When a store puts the theme in its draft, it can keep its own sections (they move over, as with any theme switch) or start from these. Without a starter, the base theme's home page is used.
Templates
templates gives the theme its own templates for the other page types. Keys are a type, product, collection, list-collections, page, blog, article, cart, search or 404, or an alternate of product, collection, page or article, like product.gift. Each is a list of sections, written and checked like starter.
"templates": {
"product": [
{ "type": "product_main", "settings": { "gallery": "thumbs", "description": "below" } },
{ "type": "trust_badges" },
{ "type": "related_products", "settings": { "count": 8 } }
],
"page.contact": [{ "type": "page_main" }, { "type": "newsletter" }]
}- A template's main section goes in its own type only:
product_maininproducttemplates,page_maininpagetemplates,not_found_mainin404, and so on. Left out, it is added first. - The announcement bar, header and footer belong to
starterand can't go in a template. - A type's template is the default for stores that never changed theirs; a store's own template wins. Alternates become the store's when it puts the theme in its draft, so it can rename or delete them.
CSS
Sections draw with inline styles, so rules usually need !important to win. Every rule is scoped to the theme's root element: :root, html and body mean that root, and nothing outside the storefront can be reached.
Hooks to aim at:
[data-section="hero"],[data-section="product_grid"]and so on: each section's wrapper.var(--vt-bg),--vt-surface,--vt-ink,--vt-muted,--vt-accent,--vt-on-accent,--vt-line,--vt-glow,--vt-radius,--vt-heading-font,--vt-body-font: the preset and settings in use.
Allowed: plain rules, @media, @supports, @container (two levels deep), @font-face and @keyframes. Keyframe names are renamed per theme, and the animations that use them follow.
Refused, with the line it was found on:
@import,@layer,@page,@charsetand other at-rules.url()anywhere excepthttps://fonts.googleapis.com/...,https://fonts.gstatic.com/...and the store's own files (/api/files/<id>). Alsoimage-set(),image(),cross-fade(),element(),src()andpaint().expression(),behavior,-moz-binding,javascript:,vbscript:.- Any
<(so writemax-width: 699pxinstead ofwidth < 700px), and backslash escapes. - Selectors that start with
+or~, and nested rules. - More than 800 rules, and a
/*comment that is never closed.
The check runs on upload and again whenever a store renders the theme. CSS that fails it is not shown at all: a theme never renders half-checked CSS.
Uploaded themes on the Themes page
Each uploaded theme has a card under Uploaded themes with a preview, its version, the theme it is based on, and when it was uploaded. Badges say where it is used:
| Badge | Meaning |
|---|---|
| Live here | This store's live theme. Shows the version when the store is live on an older one. |
| In your draft | This store's draft is on it. Shows the version when the draft is on an older one. |
| Used by | Other stores in the organization have it live. |
Try with my products works as for the free themes. The More menu has:
- Use in draft - puts the newest version in this store's draft. Your sections move over; nothing goes live yet.
- Update the draft to and the version - when the draft is on an older version.
- Download the theme file - the newest version as a theme file.
- Delete - see below.
Versions
Upload a file with the same id and a higher version to add a version. The dialog says which version the organization is on now, and which stores keep the version they use. A version that is not higher is refused, with the next one to use: version: Noir Lux 1.0.0 is already uploaded. Raise "version" in the file, for example to 1.0.1.
Stores don't move by themselves. Each store keeps the version it has until someone updates its draft (Update to version on the current theme card, or Update the draft to on the theme's card) and publishes. Putting an uploaded theme in a draft (Use in draft, or switching back to it from the library) always takes the newest version.
What an update changes in the draft:
- Fonts, presets and CSS come from the new version.
- The preset stays if the new version still has it, otherwise the first preset is used.
- The home page sections and the theme settings stay as the store has them. New
defaultsandstartervalues in the file don't replace them.
Deleting
More > Delete on an uploaded theme removes it from the organization, with every version, and no store can pick it again. It can't be undone: download the file first if you may need it.
A theme can't be deleted while any store in the organization has it live, in its draft, or in a waiting schedule. The dialog names those stores; move them to another theme first. Built-in themes can't be deleted.
Exporting a theme
More > Export as a theme file on the current theme card downloads the store's live theme as a theme file (and Export the draft the draft, when it has changes). Use it to bring a look to another store, or as a working file to edit and upload.
The export holds:
- The theme's fonts and all its presets, the one in use first.
- The store's theme settings, as
defaults. - The home page's sections and their text in every language, as
starter. - Every other template the store changed, and its alternates, as
templates. - The CSS, for an uploaded theme.
An exported built-in theme gets an id made from the store and the theme (my-store-velour), the name of both, and version 1.0.0. An exported uploaded theme keeps its own id, name and version, so raise the version before uploading it again.
Limits
| Limit | Value |
|---|---|
| File size | 256 KB |
| Presets | 1 to 12 |
| Starter sections | 40 |
| CSS | 48 KB, 800 rules, at-rules two levels deep |
id | 2 to 40 characters |
name | 2 to 60 characters |
description | 400 characters |
| Problems listed per upload | 60 |
Who can upload
Uploading, updating and deleting themes needs the Storefront permission in the store you do it from. The theme then belongs to the whole organization.
Related
Preferences
The home page's search listing - its title, meta description and sharing image per language, and how they show in Google and in link previews.
Scheduled publishing
Freeze a copy of the draft and have it go live by itself at a date and time in the store's time zone - how to schedule, reschedule, preview and cancel, and the rules that decide what goes live.