Shopify Custom CSS Generator
Describe a visual change (hide something, spacing, color, mobile only) and get valid CSS, scoped correctly and placed in the right file.
Three places CSS can go
| Scope | Where it goes |
|---|---|
| One section | A {% style %} tag inside that section file, scoped to #shopify-section-{{ section.id }} |
| No code access | A Custom Liquid section or block (Add section > Custom Liquid in the theme editor), pasting a scoped <style> tag |
| Whole theme | The theme's main stylesheet under Edit code > Assets (often base.css), or a {% style %} block in theme.liquid |
Picking One section keeps a rule from accidentally hitting the same section elsewhere on the page or a similar-looking element in a different section; picking The whole theme is right for something like a global font-size tweak.
Mobile and desktop breakpoints
Mobile-only and desktop-only rules use standard @media queries. Shopify's Dawn-based themes switch at 749px/750px, but themes vary, so the generated CSS notes that you should confirm your own theme's breakpoint (its stylesheet's nearest max-width media query) if a rule doesn't seem to apply.
Finding the right selector
Give the class or element name if you already know it (right-click the element in your browser, choose Inspect, and read the class from the highlighted HTML). Without one, the generator writes a plausible selector from standard theme naming and says so, so you know to double-check it against your actual markup before you're sure it worked.
Questions people ask
Does Shopify have a built-in Custom CSS setting?
Not every theme, and not one central field. Themes built on Online Store 2.0 let you add scoped CSS through a section's own {% style %} tag, or through the built-in Custom Liquid section if you don't want to touch theme code.
Will this CSS affect other sections by accident?
Not if you pick One section: the generator scopes the rule to that section's own ID so it can't leak elsewhere on the page.
What if I don't know the class name?
Leave it blank. The tool writes its best guess from common theme class names and flags it so you can confirm it in your browser's inspector.
Can this change color settings that update live in the editor?
That needs a setting reference like {{ settings.colors_accent_1 }} inside a {% style %} tag rather than a fixed CSS value; ask for it by name and the tool will use it where it applies.
I want a whole custom section built from scratch, not just a style tweak.
Use the AI Shopify section generator instead.
Related tools
Last reviewed 30 September 2026.
Sources: Shopify.dev: Liquid {% style %} tag · Shopify.dev: Section schema
