Try the theme settings first. If a setting exists for what you want, use it. Settings survive theme updates cleanly, and CSS that fights the theme tends to break later.
Where to add CSS
There are three places, from most specific to most general.Section-level CSS
Use this when you’re changing one section and don’t want the change leaking anywhere else.- Open the theme editor (Customize).
- Click the section you want to change.
- Scroll to the bottom of the section’s settings panel to Custom CSS.
- Paste your CSS and Save.
.elxr-btn { ... } and they only affect this section.
Theme-level CSS
Use this when the change should apply store-wide: every button, every product card, every page.- Open the theme editor.
- Go to Theme settings (the paintbrush icon).
- Open Custom CSS at the bottom of the settings list.
- Paste your CSS and Save.
Longer CSS via <head> code
The two fields above are capped at 500 and 1,500 characters. When you outgrow them, use Elixir’s own field:
- Go to Theme settings → Extra.
- Open
<head>tag code. - Wrap your CSS in a
<style>tag:
Find the element you want to change
The AI can’t see your store, so you need to tell it what to target.- Open your store in Chrome.
- Right-click the element you want to change and choose Inspect.
- In the panel that opens, the highlighted line is your element. Right-click it → Copy → Copy outerHTML.
- Paste that into your prompt.
Let AI write the CSS
Copy this into ChatGPT, Claude, or any AI assistant and fill in the three bracketed lines.If it doesn’t work, reply with this
A worked example
What you’d send:
WHAT I WANT: Round the corners of my product images on the collection page and add a subtle shadow.
WHERE I’LL PASTE IT: Theme settings Custom CSS, 1,500 char limit.
THE ELEMENT: <div class="card__media">…
What you’d get back:
Rules and limits
Shopify’s Custom CSS fields reject some things. If your CSS won’t save, it’s usually one of these:
Inside a section, only
@media, @container, @layer, and @supports at-rules are allowed.
Breakpoints
Elixir uses the same breakpoints throughout, so target them the same way:Troubleshooting
Nothing changed after I saved
Nothing changed after I saved
The theme’s own styles are winning. Ask the AI for a more specific selector, or add
!important to the property. Also confirm you pasted into the right place, since section-level CSS only affects the section you had selected.It works on desktop but not mobile
It works on desktop but not mobile
Your rule is probably being overridden inside a media query. Wrap the mobile version in
@media (max-width: 749px) and set it there explicitly.Shopify won't let me save the CSS
Shopify won't let me save the CSS
You’ve hit a limit or a blocked rule. Check the table above. Most often it’s the character limit or an
@import. Move the CSS to Theme settings → Extra → <head> tag code, which has neither restriction.My CSS stopped working after a theme update
My CSS stopped working after a theme update
Class names can change between versions. Re-inspect the element, get the new class name, and ask the AI to update the selector. Custom CSS lives in your theme settings rather than in code files, so an update doesn’t erase it. Selectors can go stale though, so re-check your customizations after a major update.
I broke something and want to start over
I broke something and want to start over
Clear the Custom CSS field and save. Nothing else is affected, because custom CSS never modifies your theme’s code.
