> For the complete documentation index, see [llms.txt](https://staylime.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://staylime.com/docs/volume-themes/faq/theme-setup-and-updates/where-should-i-put-custom-css-so-an-update-does-not-wipe-it.md).

# 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.

{% hint style="warning" %}
Do not paste custom styles into `assets/base.css` or any other theme file. Those edits live only in the theme copy you edited and are lost the moment you publish an updated version of Volume — see [Will updating Volume erase my customizations?](/docs/volume-themes/faq/theme-setup-and-updates/will-updating-volume-erase-my-customizations.md).
{% endhint %}

### 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.

{% hint style="success" icon="lightbulb" %}
Many things merchants reach for CSS to fix already exist as settings. Check [Colors](/docs/volume-themes/theme-settings/colors.md), [Typography](/docs/volume-themes/theme-settings/typography.md) and [Layout](/docs/volume-themes/theme-settings/layout.md) first. If you need extra markup rather than extra styling, use a **Custom Liquid** or **Custom HTML** section — those are settings too, so they survive updates as well.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://staylime.com/docs/volume-themes/faq/theme-setup-and-updates/where-should-i-put-custom-css-so-an-update-does-not-wipe-it.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
