Gutenberg Block Plugins That Load CSS Only Where It Is Used

Since WordPress 6.8, core itself loads block scripts and stylesheets “on demand only if the blocks are included in the page”, and block themes do this by default. The core team’s announcement put it plainly: “Block themes now opt in by default.” So the baseline has moved. A page built from core blocks on a block theme already ships only the CSS those blocks need. The question for a site owner is whether the block plugin on top of it keeps to that standard or quietly undoes it.
The plugins vary more than their marketing suggests. GenerateBlocks removed its external CSS file option entirely in version 2.5.0 and now always inlines page-local CSS. Kadence registers a stylesheet per block and prints it when that block renders. Greenshift splits its styles into per-block chunks and inlines them in the head. Spectra Legacy inlines by default but can write separate files. And plugin download size, from 1.27 MB for GenerateBlocks to 12.57 MB for Kadence Blocks, tells you almost nothing about what reaches a visitor.
This guide covers only how block plugins load their own CSS and JavaScript. Caching, critical CSS and interaction speed are separate jobs, covered in our other performance guides and linked below.
Plugin behaviour is described from each plugin’s readme, changelog, documentation and code on wordpress.org as of December 2026. Prices are regular prices from vendor pricing pages, in US dollars excluding tax; Black Friday and Cyber Monday offers running when this was checked are temporary.
What “CSS on demand” means in practice
Every block plugin in this guide claims to load only what a page uses. They do it in three different ways, and the difference matters once a cache is involved.
Per-block stylesheets. Each block has its own small stylesheet, registered with WordPress and printed only when that block appears on the page. This is the model core uses. The browser can cache each stylesheet and reuse it on the next page that has the same block.
Inline page CSS. The plugin builds the CSS for the specific blocks and settings on a page and writes it into the HTML, usually in a <style> tag in the head. There is no extra request, nothing to regenerate when you edit a page, and nothing for a cache plugin to get out of step with: the styles travel with the cached HTML. The trade-off is that the same CSS is downloaded again with every page rather than cached once.
Generated CSS files. The plugin writes a CSS file per page or per post to the uploads folder and links to it. The browser can cache it, but the file has to be regenerated when the page changes, and stale files after a migration, a cache purge or a CDN change are a familiar support problem.
None of the three is always best. Inline CSS is simplest to run behind a page cache and tends to suit sites where visitors read one or two pages. Per-block files suit sites where visitors browse many pages built from the same blocks. Generated files sit in between and carry the most moving parts.
The 6 options compared
1. GenerateBlocks
Inline page-local CSS only, from the smallest plugin here. Free; Pro only in GeneratePress One from $99 a year.
GenerateBlocks has 200,000+ active installs, and the free plugin is a 1.27 MB download with nine blocks: element, text, media, shape, query, looper, loop item, query page numbers and query no-results. Everything is built from those, which keeps the amount of CSS per page small by design.
Version 2.5.0 made a quiet but significant change. Its changelog reads: “Always embed page-local block CSS inline and retire its print-method setting, filters, and regeneration endpoint.” The old option to write CSS to an external file is gone, and the function that used to set the print method is deprecated and now always returns inline. If you had chosen the file method for a reason, such as a strict content security policy or a caching setup built around it, that choice no longer exists. For most sites behind a page cache, inline is the simpler arrangement anyway.
Pro is not sold separately. It comes inside GeneratePress One, on the GeneratePress pricing page at $99 a year for one site, $149 for ten, $199 for 100, or $596 once for 100 sites. A Black Friday discount of $40 was showing when this was checked.
- CSS strategy: Inline page-local CSS, always (since 2.5.0)
- Setting: None; the print-method setting was retired
- Free blocks and zip: 9 blocks, 1.27 MB
- Watch out for: No external-file option any more
2. Kadence Blocks
A large plugin with on-demand output. Free; Pro only in a $350-a-year Liquid Web bundle.
Kadence Blocks has 600,000+ active installs, 62 free blocks and the largest download here at 12.57 MB. Its readme says “it only loads CSS or Javascript when you need it- and only for the blocks you are using on a specific page.” The code bears that out: each block’s stylesheet is registered separately and printed when that block renders, through a method called should_render_inline_stylesheet() in the plugin’s abstract block class.
Two filters let developers change the behaviour: kadence_blocks_force_render_inline_stylesheet and kadence_blocks_force_render_inline_css_in_content. Most site owners will never touch them, but they are useful if a caching or optimisation plugin is mishandling the stylesheets. The point to take from Kadence is that a 12.57 MB plugin can still ship modest front-end output, because most of that size is editor code and blocks a given page never uses.
Paid Kadence is now sold only as the Liquid Web Kadence bundle, $350 a year for one site, with LearnDash, The Events Calendar and Give included.
- CSS strategy: Per-block stylesheets, printed when the block renders
- Setting: Developer filters to force inline output
- Free blocks and zip: 62 blocks, 12.57 MB
- Watch out for: Download size is not front-end weight; measure the page
3. Spectra Blocks (and Spectra Legacy)
A 2026 rebuild on core block APIs, set against its predecessor’s file-generation setting. Free; Spectra Pro $69 a year for three sites.
Brainstorm Force split Spectra in two in July 2026. Spectra Blocks, 80,000+ installs and a 10.76 MB download requiring PHP 8.1, is “a complete rebuild of Spectra on WordPress’s modern core-block APIs”. Its readme answers the obvious question about running both plugins: “Each plugin only loads assets for the blocks a given page uses, so running both isn’t a heavy performance tax.” Changelog 1.0.14, from 6 November 2026, adds that “Spectra loads block styles and scripts more efficiently”.
Spectra Legacy, the original 1,000,000+ install plugin, works differently. Its documentation says “By default, Spectra loads CSS and JS inline on the page”, and offers an option to generate separate CSS and JS files instead, stored as _uagb_allow_file_generation. If you run Legacy behind a page cache and have switched file generation on, check that the files regenerate after edits, or switch back to inline. Legacy still gets maintenance and security updates but no new features.
Spectra Pro, on the Spectra pricing page, costs $69 a year for three sites, or $349 lifetime, and one licence covers both plugins.
- CSS strategy: Blocks: assets only for blocks used. Legacy: inline by default, optional files
- Setting: Legacy’s file generation option
- Zip: Blocks 10.76 MB; Legacy 8.47 MB
- Watch out for: PHP 8.1 for Spectra Blocks
4. Greenshift
Per-block style chunks, inlined in the head, with a selectable CSS mode. Free; paid packs from $39.99 a year.
Greenshift has 70,000+ active installs, 31 blocks and a 4.62 MB download. Its readme describes the approach in one sentence: “All blocks are divided on style chunks which are loaded only when you use them on page… All styles are loaded inline in head section of page to prevent CLS and incompatibilities with cache plugins.” That is a hybrid of the per-block and inline models: the CSS is split by block, so only used blocks contribute, but it is delivered inline rather than as files.
The plugin’s settings include a CSS save option, gspb_css_save, with an inline-block mode, so developers can choose how styles are stored. Greenshift is aimed at performance-minded builders who are comfortable with a smaller, more technical block set.
On the Greenshift pricing page, packs start at $39.99 a year for the Design Pack on one site, and the All in One pack costs $129.99 a year for unlimited sites, or $399.99 lifetime. A Black Friday coupon was advertised when this was checked.
- CSS strategy: Per-block chunks, inlined in the head
- Setting: CSS save mode, including inline
- Free blocks and zip: 31 blocks, 4.62 MB
- Watch out for: A more technical builder than most
5. Stackable
An inline CSS optimiser that combines selectors, in a small download. Free; Premium from $49 a year.
Stackable has 100,000+ active installs and is a 1.77 MB download. Its wordpress.org listing claims “Only ~15KB gzipped CSS on the frontend”, and its documentation says “Most loaded files by Stackable are only loaded when specific features or blocks are used.” A changelog entry for version 3.13.2 added a filter that makes Stackable’s CSS files load “even if no blocks are present”, which confirms that the default is to skip them on pages without Stackable blocks.
The distinctive setting is stackable_optimize_inline_css, which “Optimizes inlined CSS styles, combines together similar selectors”. On pages with many Stackable blocks that share styles, combining selectors reduces repetition in the inline CSS. The 15 KB figure is the vendor’s own and will vary with the blocks you use, so treat it as a ceiling to check rather than a promise.
Premium, on the Stackable pricing page, costs $49 a year for one site, $99 for ten and $149 unlimited, or $189 to $499 lifetime.
- CSS strategy: Shared files loaded when blocks are used, plus optimised inline CSS
- Setting: Inline CSS optimiser
- Zip: 1.77 MB
- Watch out for: The 15 KB figure is a vendor claim
6. Core blocks only
The baseline every plugin should be measured against. Free, and on demand by default in block themes.
WordPress 6.8 introduced the should_load_block_assets_on_demand filter. Block themes opt in by default, which means core block scripts and stylesheets load only when those blocks are on the page. Classic themes have to opt in. The core announcement gives an example for a classic-theme site that wants on-demand loading while keeping the combined core stylesheet: set should_load_separate_core_block_assets to false and should_load_block_assets_on_demand to true. If you run a classic theme and have never touched these, core is probably loading more than it needs to.
Core blocks have also become more capable. WordPress 7.0, released on 20 May 2026, made the Navigation block’s mobile overlay a template part you can design in the Site Editor. For a brochure site or blog, core blocks on a block theme are often enough, and they set the lowest front-end weight you can reach. Any block plugin should add to that baseline only on pages where its blocks are used.
- CSS strategy: Per-block, on demand
- Setting: On by default in block themes; filters for classic themes
- Price: Free
- Watch out for: Classic themes must opt in
Two more suites state similar behaviour. Otter’s code checks whether each of its blocks is on the page before loading that block’s front-end dependencies, and its vendor FAQ says “unused blocks add zero weight to your pages.” Essential Blocks writes per-block CSS files to a front-end style directory, and its FAQ says it “helps to load only the resources that are currently used.”
Comparison table
| Option | CSS strategy (documented) | Setting or filter | JS only when needed (vendor statement) | Free blocks | Zip size | Paid from (regular) |
|---|---|---|---|---|---|---|
| GenerateBlocks | Inline page-local CSS, always | None since 2.5.0 | Not stated | 9 | 1.27 MB | $99 a year (GeneratePress One) |
| Kadence Blocks | Per-block stylesheet on render | Force-inline filters | Yes (readme) | 62 | 12.57 MB | $350 a year (bundle) |
| Spectra Blocks | Assets only for blocks used | None documented | Yes (readme) | All blocks free | 10.76 MB | $69 a year |
| Spectra Legacy (reference) | Inline by default, optional files | File generation option | Not stated | Large set | 8.47 MB | $69 a year (same licence) |
| Greenshift | Per-block chunks, inline in head | CSS save mode | Not stated | 31 | 4.62 MB | $39.99 a year |
| Stackable | Conditional files plus optimised inline CSS | Inline CSS optimiser | Yes (docs) | 42 | 1.77 MB | $49 a year |
| Core blocks only | Per-block, on demand | Default in block themes | Yes | Core set | Not applicable | Free |
The table records what each plugin documents. It is not a measurement of your pages, which depend on the blocks, settings and theme you use. The next section shows how to get that number yourself.
How to measure it on your own site
Download size is the wrong number and vendor claims are a starting point. The number that matters is the CSS and JavaScript a real page sends. You can measure it in half an hour on a staging copy.
- Create one test page with five common blocks from the plugin: a heading, a columns or container layout, buttons, an image, and one interactive block such as tabs or an accordion.
- Create a second page with core blocks only. This is your baseline.
- Temporarily turn off page caching and any CSS or JavaScript optimisation plugin, so you see what the block plugin itself outputs.
- Open each page in a private browser window with developer tools open. In the Network tab, filter by CSS and then by JS, reload, and note the number of requests and the transferred size.
- View the page source and search for
<styleto see how much CSS is inlined in the HTML; this does not appear as a separate request. - Check a page with none of the plugin’s blocks. Ideally the plugin adds nothing there.
- Repeat with a block theme such as Twenty Twenty-Five and, if you use one, your classic theme.
Once you have the numbers, turn caching and optimisation back on. From here, the work belongs to other tools. Our guides to caching plugins for Core Web Vitals and lazy loading and critical CSS plugins cover what to do with the CSS a page does need, and plugins for fixing Interaction to Next Paint covers JavaScript that slows responses.
Frequently asked questions
Does WordPress load block CSS only where it is used?
For core blocks in block themes, yes, by default since WordPress 6.8. Classic themes need to opt in through filters.
Is inline CSS better than a CSS file?
Not always. Inline CSS avoids a request and stays in step with cached HTML. Files can be cached by the browser across pages. Inline suits small per-page CSS behind a page cache.
Why did GenerateBlocks remove the external file option?
Its 2.5.0 changelog retired the print-method setting, filters and regeneration endpoint and made inline the only method. The changelog states the change rather than a reason.
Does a bigger plugin mean a slower site?
Not directly. Kadence Blocks is a 12.57 MB download but documents loading CSS and JavaScript only for blocks on the page. Measure the page, not the zip.
Can I run Spectra Legacy and Spectra Blocks together?
Yes. Brainstorm Force says each “only loads assets for the blocks a given page uses”, so running both is not a heavy performance cost.
Will a caching plugin fix a heavy block plugin?
Partly. Caching speeds up delivery, but CSS and JavaScript the plugin sends still has to be downloaded and processed. Fix the source first.
The verdict
Start with core blocks on a block theme. Since WordPress 6.8 they load on demand by default, and every plugin should be judged by what it adds on top.
For a speed-first blogger: GenerateBlocks. Nine blocks, a 1.27 MB plugin and inline page-local CSS that works cleanly behind any page cache. The free plugin is enough for most layouts.
For an agency on block themes: Kadence Blocks or Spectra Blocks, both of which document loading assets only for blocks used. Measure one representative page per client before standardising.
For a classic-theme site: opt core into on-demand loading with the 6.8 filters first, then choose a plugin with inline or per-block output. If you use Spectra Legacy with file generation, confirm the files regenerate after edits.
For performance-led builds: Greenshift or Stackable, both with documented per-block or optimised inline CSS, and both worth measuring against the core-only baseline before you commit.




