Shopify CSS Subsetting: Your Theme Just Got Faster

Shopify CSS subsetting illustration showing a theme loading only relevant CSS per page for faster speed

Shopify CSS subsetting went live on April 20, 2026 — and most merchants have no idea it happened. Your theme now loads only the CSS each page actually needs, instead of dumping every stylesheet on every page load. It's one of the biggest theme speed improvements Shopify has shipped in years.

CSS subsetting applies automatically to every store using {% stylesheet %} tags. No app to install. No code to write. But there's a catch: if your theme's CSS isn't structured correctly, some styles might silently break. Here's what changed, why it matters for your store speed, and what to check.

Why CSS Was Slowing Down Your Store

CSS is render-blocking by default. When a browser hits a CSS file, it stops everything — no text, no images, no layout — until that file is fully downloaded and parsed. The bigger the file, the longer your customers stare at a blank screen.

Shopify themes typically load 150–400KB of CSS on every page. But any single page — your homepage, a product page, a collection — only uses 30–40% of those styles. The rest is dead weight: styles for sections that don't exist on that page, blocks that aren't rendered, snippets that aren't called.

According to the 2025 Web Almanac, 85% of mobile pages still fail the render-blocking resources audit. For Shopify stores, CSS is a primary offender. Render-blocking resources slow the average store by 1–3 seconds — time that directly erodes conversion rates and tanks your Core Web Vitals scores.

What Is Shopify CSS Subsetting?

Shopify CSS subsetting is an automatic optimization that delivers only the CSS relevant to the sections, blocks, and snippets rendered on each page — instead of loading every stylesheet on every page. It applies to all CSS defined inside {% stylesheet %} tags.

Before this change, Shopify collected all {% stylesheet %} CSS across your entire theme, bundled it into a single styles.css file, and served that full bundle on every page load.

Now, Shopify analyzes which sections, blocks, and snippets are actually rendered on each page — the "render tree" — and only includes the CSS from those files. If a section isn't on the page, its styles don't load.

The result: smaller CSS payloads, faster First Contentful Paint, and better LCP scores. A product page that used to load 300KB of CSS might now load 90–120KB, because it's no longer carrying styles for your FAQ section, blog grid, or testimonial slider that only appear on other pages.

Check If Your Theme Is Compatible

If your theme follows one simple rule — each file's {% stylesheet %} only styles HTML elements within that same file or its direct children — you're fine. No changes needed. This is how well-structured themes already work.

The problem happens when CSS in one file styles elements in an unrelated file. For example, if your header.liquid section's stylesheet contains classes used by footer.liquid, those footer styles won't load on pages where the header renders but the footer's stylesheet isn't in the render tree.

Here's how to check:

  1. Open your store in an incognito browser window. Clear any cached versions by adding ?v=test to the URL.
  2. Inspect individual pages. Visit your homepage, a product page, and a collection page. Look for broken layouts, missing backgrounds, or unstyled elements.
  3. Check the browser console. Open DevTools (F12), look at the Network tab, filter by CSS. You should see a smaller styles.css file than before.
  4. Test sections that appear on some pages but not others. If your collection page looks fine but your homepage's featured collection section has broken styling, you likely have a cross-file CSS dependency.

Fix Cross-File CSS Dependencies

If you find broken styles, the fix is straightforward: move the CSS to the file where it belongs.

Say your announcement-bar.liquid section's stylesheet includes a utility class like .visually-hidden that other sections also use. Before subsetting, this worked because all CSS loaded everywhere. Now, pages without the announcement bar won't have that class.

Two approaches:

  • Move shared styles to a global stylesheet. Put utility classes and resets in your theme's main CSS file (usually base.css or theme.css) loaded via a <link> tag in theme.liquid. Global stylesheets loaded via <link> tags aren't affected by subsetting — only {% stylesheet %} tags are.
  • Duplicate the class where it's needed. If only two sections use a shared class, add it to both sections' stylesheets. A few bytes of duplication is better than a broken layout.

How This Affects Apps and Third-Party Code

CSS subsetting only applies to {% stylesheet %} tags inside theme sections, blocks, and snippets. It doesn't touch:

  • CSS loaded via <link> tags in theme.liquid or layout files
  • Inline <style> blocks
  • CSS injected by Shopify apps through theme app extensions

If you're using apps that inject their own CSS, those styles load independently and aren't affected. But if you've manually added app-related CSS to a section's {% stylesheet %} tag (common when customizing app appearance), those styles will now only load on pages where that section renders.

Measure the Difference

You can quantify exactly how much this change helps your store:

  1. Run a Lighthouse test before and after. Use Chrome DevTools or PageSpeed Insights. Focus on the "Eliminate render-blocking resources" and "Reduce unused CSS" audits.
  2. Compare CSS transfer sizes. In DevTools' Network tab, filter by CSS and note the total transferred size on different pages. Compare against your full stylesheet bundle size.
  3. Track Core Web Vitals. Check your Search Console's Core Web Vitals report over the next 28 days. LCP improvements from smaller CSS payloads should show up within a few weeks.

As of 2025, only 48% of mobile websites pass all three Core Web Vitals thresholds. Every kilobyte of unnecessary CSS you eliminate moves your store closer to that passing group — and Google's algorithm updates continue to reward stores that meet those benchmarks.

What to Do Right Now

If you haven't touched your theme's code recently, you probably don't need to do anything. The subsetting is automatic, and most modern Shopify themes (Dawn, Craft, Sense, and their derivatives) already follow the self-contained CSS pattern.

But if you've customized your theme, added custom sections, or had a developer modify your stylesheets in the past year — spend 10 minutes testing. Open your store's key pages in an incognito window and look for anything that looks off. Fixing a cross-file CSS dependency takes minutes. Discovering it from a customer complaint takes longer and costs more.

Your theme just got faster without you lifting a finger. Make sure nothing broke in the process.