On this page
Customise
Themes
The design layer under themes/ - what lives there, what you may edit, how an update treats your edits, and a worked example.
A file's layer is its path#
Every file in your copy of the template is one of two kinds, decided by where it is:
- Design: anything under
themes/. Yours to edit. An update merges its changes with yours and never replaces a file you edited. - Engine: everything else. An update replaces it with the release's version.
So keep your changes under themes/. Updates has the detail.
The files in a design#
| File | What it does |
|---|---|
theme.json |
The design's name, its contract number, its template, the order of its stylesheets, the default view, and optional links, home and intro |
tokens.css |
Colours, type, spacing and corner sizes, for light and dark. Loaded first |
site.css |
The header, footer, token pages, cart, forms and API page |
market.css |
The collection pages: rows, cards, filters, charts and activity |
one-collection.css |
Optional. The landing page and the rest of a one-collection site's look. Sent only on a site with exactly one Ethereum collection |
custom.css |
Your own rules. Loaded last. Releases never change it, so an update never has to merge it |
frame.html |
The page's outer markup: where the header, the main content and the footer go |
logo.svg |
Optional. Your logo, beside the site name. At most 32 KB, shown as an image so nothing inside it can run |
The engine loads tokens.css, each file in stylesheets, then one-collection.css on a one-collection site, then custom.css, all in one <style> element in each Ethereum storefront page. Ink's page, the setup page and the data console have their own layouts.
Only .css, .html, .svg, .json, .woff2, .png, .ico and .md files are allowed under themes/. A stylesheet may use only files from its own design folder (.woff2, .png, .ico, written from the site's root), the engine's font and data: images. Nothing from another site loads: the page's security policy forbids it.
Tokens#
tokens.css has two blocks: :root{ for light and :root[data-theme="dark"]{ for dark. The main ones:
| Token | What it colours |
|---|---|
--paper |
The page background |
--ink |
The text |
--soft |
Secondary text |
--line |
Hairlines |
--accent |
Buttons, links and the live dot |
--accent-strong |
The hover shade of the accent |
--accent-wash |
The pale background behind selected items |
--on-accent |
Text on an accent background |
--font, --mono |
The typeface, and the one for addresses and code |
--s1 to --s6, --r1 to --r4 |
Spacing steps (4 to 32 px) and corner sizes |
A worked example: your accent colour and typeface#
Put both changes in themes/trader/custom.css, so an update never has to merge them.
- Put your font file at
themes/trader/fonts/brand.woff2. Check that its licence lets you serve it from your own site. - Add to
themes/trader/custom.css:
@font-face{font-family:"Brand";src:url("/themes/trader/fonts/brand.woff2") format("woff2");font-display:swap}
:root{--font:"Brand",system-ui,sans-serif;--accent:#c2410c;--accent-strong:#9a3412;--accent-wash:#fff1e8;--on-accent:#fff}
:root[data-theme="dark"]{--accent:#fb923c;--accent-strong:#fdba74;--accent-wash:#2a1608;--on-accent:#1c0a02}- Check and preview:
npm run check:theme
npm run devnpm run check:theme prints each problem with its file and line, and No problems found when there are none. Then open http://127.0.0.1:8787/ and look at a phone-sized window as well as a wide one, in light and dark. If you use Gallery, make the same change in themes/gallery/custom.css.
To change one colour everywhere instead, edit its line in both blocks of tokens.css.
One-collection rules#
Everything that exists only for a site with one collection lives in one-collection.css. Each Ethereum storefront page of such a site carries data-one-collection on <body> (the setup page and the data console use their own layouts, which it does not reach); start each selector there with :where([data-one-collection]), which matches only on such a site and adds no weight:
:where([data-one-collection]) .landing h1{font-size:56px}Do not list the file in stylesheets: the engine loads it by name. A site with several collections, an Ink site and Pando's own marketplace never receive it.
What a design cannot change#
Some parts of every page belong to the engine: the review before a signature or payment, with its amounts, fee lines and warnings; the fee lines and disclosures; every script; the page's head and its security policy; and the /setup and data console pages.
A stylesheet can still hide anything on the page, a price or a fee line included, and no check can catch every way. After any change, open a purchase review and a listing review and check the amounts, the fee line and the buttons can be read. You are responsible for what your visitors can no longer see.
How an update treats your edits#
| Your file | The release | Result |
|---|---|---|
| Not edited | Changed | Takes the new version |
| Edited | Not changed | Stays as it is |
| Edited | Changed, other lines | Merged line by line |
| Edited | Changed, the same lines | Kept as you wrote it, listed under Design files that need your hand |
custom.css |
Never changed by a release | Never conflicts |