
Liquid Theme Standards
Shopify theme sections and snippets that follow modern Liquid, CSS Grid, container queries, and accessibility patterns.
Overview
liquid-theme-standards is an agent skill for the Build phase that teaches Shopify Liquid sections and snippets with modern scoped CSS, grid layouts, and accessibility-minded patterns.
Install
npx skills add https://github.com/benjaminsehl/liquid-skills --skill liquid-theme-standardsWhat is this skill?
- Full section example with {% stylesheet %} blocks, CSS variables from section settings, and {% render %} for product car
- Container queries (@container) for responsive grids tied to section column settings
- prefers-reduced-motion handling for accessible motion defaults
- Grid and flex layout recipes for collection and page layouts
- Patterns aligned with theme editor settings (padding, columns, limits) not hard-coded magic numbers
Adoption & trust: 1.7k installs on skills.sh; 108 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are editing a Shopify theme and the agent keeps mixing inline styles, brittle layouts, and inconsistent section/snippet structure.
Who is it for?
Indie merchants or agencies shipping custom Shopify themes who want agents to generate section markup that matches OS 2.0-style patterns.
Skip if: Headless Shopify (Hydrogen-only) storefronts with no Liquid theme, or teams that only need Theme Check remediation without authoring new sections.
When should I use this skill?
When implementing or refactoring Shopify Liquid theme sections, snippets, and scoped CSS for storefront UI.
What do I get? / Deliverables
New or updated theme sections use settings-driven CSS variables, {% stylesheet %} blocks, grid/container patterns, and snippet renders that match maintainable Liquid theme standards.
- Liquid section/snippet markup
- Scoped {% stylesheet %} CSS using theme variables
Recommended Skills
Journey fit
Theme markup and scoped styles land in the Build phase when you are implementing storefront UI in a Shopify Liquid theme. The skill is CSS and Liquid component patterns for storefront presentation, which maps directly to frontend theme work rather than backend or ops.
How it compares
Use for Liquid/CSS theme authoring patterns, not for generic React component libraries or Shopify Admin API backend work.
Common Questions / FAQ
Who is liquid-theme-standards for?
Solo builders and small teams writing Shopify Liquid themes who want consistent section, snippet, and scoped CSS patterns when pair-programming with an AI coding agent.
When should I use liquid-theme-standards?
During Build → frontend when creating collection grids, product cards via {% render %}, theme editor settings, or responsive layout in {% stylesheet %} blocks on a Shopify storefront theme.
Is liquid-theme-standards safe to install?
It is documentation-style procedural knowledge for theme markup; review the Security Audits panel on this Prism page and your theme repo before trusting third-party skill sources.
SKILL.md
READMESKILL.md - Liquid Theme Standards
# CSS Patterns for Shopify Liquid Themes ## Complete Component Example ```liquid <section class="featured-collection" style=" --section-padding: {{ section.settings.padding | default: 60 }}px; --columns: {{ section.settings.columns | default: 4 }}; " > {% if section.settings.heading != blank %} <h2 class="featured-collection__heading">{{ section.settings.heading }}</h2> {% endif %} <div class="featured-collection__grid"> {% for product in collection.products limit: section.settings.limit %} {% render 'product-card', product: product %} {% endfor %} </div> </section> {% stylesheet %} .featured-collection { padding-block: var(--section-padding); container-type: inline-size; } .featured-collection__heading { font-size: var(--font-size-2xl); margin-block-end: var(--space-lg); text-align: center; } .featured-collection__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-md); } @container (min-width: 768px) { .featured-collection__grid { grid-template-columns: repeat(var(--columns), 1fr); } } @media (prefers-reduced-motion: reduce) { .featured-collection * { transition: none !important; } } {% endstylesheet %} ``` ## Layout Patterns ### CSS Grid for Page Layouts ```css .section-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-lg); } ``` ### Flexbox for Component Layouts ```css .product-card { display: flex; flex-direction: column; gap: var(--space-sm); } ``` ### Page-Width Container ```css .page-width { width: min(100%, var(--page-width)); margin-inline: auto; padding-inline: var(--space-md); } ``` ### Full-Bleed with Content Constraint ```css .full-bleed { display: grid; grid-template-columns: var(--space-md) 1fr var(--space-md); } .full-bleed > * { grid-column: 2; } .full-bleed > .full-width { grid-column: 1 / -1; } ``` ## Responsive Images ```css .image-container { position: relative; aspect-ratio: 4 / 3; overflow: hidden; } .image-container img { width: 100%; height: 100%; object-fit: cover; } ``` ## Using :is() for Parent-Child Relationships ```css /* Multiple parents, same child */ :is(.hero, .banner) .heading { font-size: var(--font-size-2xl); } /* Same parent, multiple children */ .card:is(.card--featured, .card--promoted) { border: 2px solid var(--color-accent); } ``` Don't use `:is()` for simple comma-separated selectors — use regular comma separation instead. ## Variable Override Pattern Use CSS variables to reduce redundancy across modifiers: ```css .button { background: rgb(var(--button-color) / var(--button-opacity, 1)); color: rgb(var(--button-text)); } .button--secondary { --button-color: var(--color-secondary); --button-text: var(--color-foreground); } .button--outline { --button-color: transparent; --button-text: var(--color-accent); --button-opacity: 0; } ``` ## Focus Styles ```css :focus-visible { outline: 2px solid rgb(var(--color-focus)); outline-offset: 2px; } /* High contrast mode */ @media (forced-colors: active) { :focus-visible { outline: 3px solid LinkText; } } ``` ## Print Styles ```css @media print { .no-print, .cart-drawer, .navigation__mobile { display: none !important; } a[href^='http']::after { content: ' (' attr(href) ')'; } .product-card { break-inside: avoid; } } ``` ## Animation Patterns ```css /* Safe defaults — only animate transform and opacity */ .product-card { transition: transform 0.2s ease; } .product-card:hover { transform: translateY(-2px); } /* will-change only during animation */ .product-card:hover { will-change: transform; } .product-card:not(:hover) { will-change: auto; } ``` ## CSS Documentation ```css /* ============================================================================= Product Card ===============