For the complete documentation index, see llms.txt. This page is also available as Markdown.

Where should I put custom CSS so an update does not wipe it?

Where to put custom CSS in Volume so that it survives a theme update, and what to avoid editing.

Use the Custom CSS fields in the theme editor. They are stored with your theme settings rather than in a theme file, which means Shopify carries them into the updated copy automatically.

There are two of them, and the difference matters.

Store-wide CSS

Customize → Theme settings → Custom CSS applies to every page. Use it for anything global — a font tweak, a colour override, spacing that should be consistent everywhere — and for any rule that has to target body or html.

Section-level CSS

Every section and block has its own Custom CSS field at the bottom of its settings. Shopify scopes those rules to that one section automatically, so you can restyle a single banner without writing a long selector and without risking anything else on the page.

One limitation: a section's Custom CSS cannot target the wrapping .shopify-section element or anything above it. Rules that need to reach outside the section belong in the store-wide field.

Writing rules that hold up

Target classes rather than generated markup. Selectors built from deep element chains (div > div > span:nth-child(3)) break the next time a section's markup changes; a class-based selector usually survives.

If a rule refuses to apply, it is normally specificity rather than the field — the theme's own stylesheet is more specific than your one-class selector. Add the parent class to the selector rather than reaching for !important.

Be careful with colours in particular. Volume paints almost everything from CSS variables fed by the colour schemes, so a hard-coded colour in custom CSS sticks to one value while the rest of the section keeps following the scheme — and it will look wrong the moment you change the scheme or a customer's browser switches theme. Change the colour scheme instead.

lightbulb

Was this helpful?