benjaminsehl avatar

Liquid Theme Standards

This is the rulebook for teams building production Shopify themes who want to avoid the CSS soup and jQuery spaghetti that plagues most Liquid projects. It enforces BEM naming, design token systems with CSS custom properties, and Web Components instead of framework dependencies. The progressive enhancement approach is solid: semantic HTML first, then CSS, then JavaScript with native browser APIs only. Worth noting it handles the gotcha that `{% stylesheet %}` tags don't process Liquid variables, so you need inline styles for dynamic values. The defensive CSS patterns and logical properties for RTL support show this was written by someone who's debugged merchant storefronts at 2am. If you're building themes that need to scale across brands or survive a few years of maintenance, this keeps things sane.

skills.sh installs
3.1K
GitHub stars
120
last updated
Aug 21, 2026

Install

$ npx -y skills add benjaminsehl/liquid-skills --skill liquid-theme-standards --agent claude-code

Installs into .claude/skills of the current project.

Files

CSS, JS & HTML Standards for Shopify Liquid Themes

Core Principles

  1. Progressive enhancement — semantic HTML first, CSS second, JS third
  2. No external dependencies — native browser APIs only for JavaScript
  3. Design tokens — never hardcode colors, spacing, or fonts
  4. BEM naming — consistent class naming throughout
  5. Defensive CSS — handle edge cases gracefully

CSS in Liquid Themes

Where CSS Lives

LocationLiquid?Use For
{% stylesheet %}NoComponent-scoped styles (one per file)
{% style %}YesDynamic values needing Liquid (e.g., color settings)
assets/*.cssNoShared/global styles

Critical: {% stylesheet %} does NOT process Liquid. Use inline style attributes for dynamic values:

{%- comment -%} Do: inline variables {%- endcomment -%}
<div
  class="hero"
  style="--bg-color: {{ section.settings.bg_color }}; --padding: {{ section.settings.padding }}px;"
>

{%- comment -%} Don't: Liquid inside stylesheet {%- endcomment -%}
{% stylesheet %}
  .hero { background: {{ section.settings.bg_color }}; } /* Won't work */
{% endstylesheet %}

Sponsors

Details

Repository
github.com/benjaminsehl/liquid-skills
Categories
Frontend Development, Documentation, Code Review & Quality, Design & UI/UX

More from benjaminsehl/liquid-skills

All 3
1forcedotcom avatargenerating-lwc-componentsforcedotcom/sf-skillsLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patte3.1Kskills.sh installs
2markdown-viewer avatarinfocardmarkdown-viewer/skillsCreate editorial-style information cards using HTML/CSS in Markdown. Best for knowledge summaries, data highlights, event announcements, and single-topic conten3.1Kskills.sh installs
3getsentry avatarpresentation-creatorgetsentry/skillsCreate data-driven presentation slides using React, Vite, and Recharts with Sentry branding. Use when asked to "create a presentation", "build slides", "make a 3.1Kskills.sh installs
4nexu-io avatargsap-corenexu-io/open-designOfficial GSAP skill for the core API — gsap.to(), from(), fromTo(), easing, duration, stagger, defaults, gsap.matchMedia() (responsive, prefers-reduced-motion).3Kskills.sh installs
5sanity-io avatarportable-text-serializationsanity-io/agent-toolkitRender and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text. Use when implementing Portable Text rendering in any frontend f3Kskills.sh installs
6freshtechbro avataranimejsfreshtechbro/claudedesignskillsVersatile JavaScript animation engine for DOM, CSS, SVG, and JavaScript objects. Use when creating timeline-based animations, stagger effects, SVG morphing, key3Kskills.sh installs