Stop shipping block-editor CSS to a theme that never uses it
Remove Block Assets strips the CSS and SVG WordPress injects for the block editor, one output at a time, so a classic theme or a theme with its own complete stylesheet stops receiving several kilobytes of unused styles on every single page load.
- Four independent toggles, one per specific output.
- Global Styles removal automatically skipped on block/FSE themes.
- Each output dequeued at a late priority, after it's already enqueued.
- An intentionally cautious, one-at-a-time workflow.
What does Remove Block Assets do?
When the remove_global_styles module is active, TOWP_Performance registers its logic on after_setup_theme and checks four independent sub-options: gs_block_library dequeues the wp-block-library and wp-block-library-theme stylesheets, gs_global_styles removes the inline CSS WordPress generates from theme.json, gs_classic_theme dequeues the classic-theme-styles compatibility CSS added since WordPress 6.1, and gs_svg_filters removes the inline SVG WordPress injects for Duotone color filters. Since the Global Styles removal is automatically skipped on block or FSE themes, a site that depends on that inline CSS to render correctly keeps working exactly as before.
Every theme gets the same block styles, whether it uses blocks or not
Since WordPress ships this output on every front-end request by default, most themes carry it regardless of whether they actually need it.
A theme without blocks still receives block CSS
A classic theme, or one shipping its own complete stylesheet, still gets several kilobytes of block styles, layout rules and an inline SVG sprite on every front-end request.
What's safe to remove depends entirely on the theme
One theme might rely on part of this output to render correctly, while another never touches it at all, so a single blanket removal isn't a safe default for every site.
Four separate switches, one output each
The module lets each specific output get removed independently, so a site drops only what it genuinely doesn't use.
Four independent toggles
Block Library CSS, Global Styles, Classic Theme Styles and Duotone SVG Filters can each be switched off on their own, without affecting the others.
Global Styles protects block themes automatically
The removal is skipped automatically on block or FSE themes, since those themes rely on that inline CSS to actually render.
Built for a one-at-a-time workflow
Switch one item off, check the site, then move to the next, rather than committing to a single all-or-nothing removal.
Four outputs, handled carefully
Every capability below is present in the supplied PHP class and its settings registration.
wp-block-library and wp-block-library-theme dequeued
The default styles WordPress ships for core blocks like buttons, columns and images get dequeued at a late priority, after they've already been enqueued.
Skipped automatically on block and FSE themes
The inline CSS generated from theme.json only gets removed when wp_is_block_theme() confirms the active theme isn't one that depends on it.
The WP 6.1 compatibility CSS, dequeued
classic-theme-styles, the stylesheet WordPress has injected for classic themes since version 6.1, gets dequeued the same way as the block library CSS.
Two related hooks removed together
Both the wp_body_open inline SVG output and the wp_footer Duotone asset hook get removed together, guarded by a class_exists() check.
Runs after the styles are already enqueued
Each dequeue call runs at priority 100 on wp_enqueue_scripts, ensuring it executes after WordPress or the theme has already added the style.
One setting among several performance tweaks
This module sits alongside Post Revisions, Heartbeat, and Autosave Interval in the same performance group, each gated by its own toggle.
Where trimming block CSS helps most
The module supports any theme that doesn't genuinely need everything WordPress ships by default.
Classic themes that never touch the block editor's own styles
Drop the entire block library stylesheet on a theme built before blocks, or one that never relies on WordPress's own block styling.
Themes shipping their own complete stylesheet
Remove the redundant default output for a theme that already styles every block itself, without waiting on WordPress's version.
General front-end weight reduction on an established site
Trim a few kilobytes from every page load as part of a broader effort to keep front-end output lean.
Lighter pages, without guessing
The module combines a real reduction in page weight with a design that protects against breaking a block theme by accident.
A handful of dequeues, nothing recurring
The verified implementation is a small, fixed set of conditional removals registered once.
A handful of dequeue calls, evaluated once
The entire module is a small set of conditional dequeue and remove_action calls registered once, at theme setup.
No effect on any item left switched off
An unchecked toggle changes nothing at all for that specific output; WordPress's default behavior continues exactly as before.
Removed output is removed entirely
A dequeued stylesheet or removed SVG output isn't just hidden with CSS; it simply never gets generated or sent for that page load.
Page weight only, nothing about access
The code changes what gets sent to the browser, never any capability or permission.
A performance setting, not an access control
This module only affects which CSS and SVG get sent to the browser; it has no effect on any capability, permission, or user account.
A theme-aware default prevents accidental breakage
The Global Styles check specifically protects against removing CSS a block theme actually depends on to render correctly.
Guarded against a missing class
The Duotone removal checks that WP_Duotone actually exists before touching its hooks, avoiding a fatal error on WordPress versions where it doesn't.
Configuration requires the same access as any other setting
Toggling any of these four items happens through the standard TheOneWP settings screen, available only to an administrator.
Built directly around WordPress's own block-asset hooks
The supplied code integrates through APIs present in WordPress core; this page makes no compatibility claim beyond the verified implementation.
wp-block-library and wp-block-library-theme handles
The native WordPress style handles registered for the default core-block CSS, dequeued directly by handle.
wp_enqueue_global_styles action
The native WordPress action responsible for outputting the inline CSS generated from a theme's theme.json file.
WP_Duotone class hooks
The native WordPress class responsible for Duotone's inline SVG filter output, hooked on wp_body_open and wp_footer.
TheOneWP versus common alternatives
Compare the verified implementation with a typical all-or-nothing removal snippet.
| Capability | TheOneWP Remove Block Assets | Other common solutions |
|---|---|---|
| Granularity | Four independent toggles, one per specific output | Often a single all-or-nothing switch for every block-related asset |
| Block theme safety | Global Styles removal automatically skipped on FSE themes | A blanket removal can silently break a block theme's own styling |
| Duotone coverage | Both related hooks removed together, class-guarded | Frequently overlooked entirely, or removed without checking the class exists |
| Dequeue timing | Runs at a late priority, after the style is already enqueued | An earlier hook can miss a style enqueued later by the theme |
| Administration | Four labeled toggles with plain-language descriptions | Usually a single technical option with no per-item explanation |
Test the theme, one toggle at a time
Confirm each specific removal is safe for the active theme before moving to the next.
Enable Remove Block Assets
Activate the module from the TheOneWP System settings tab.
Switch on one item
Start with a single toggle, such as Block Library CSS, rather than enabling all four at once.
Check the site
Look over the front end for anything that looks off before deciding to keep the change.
Repeat for the next item
Move on to the next toggle only once the previous one has been confirmed safe for the theme.
Move carefully, revisit after any theme change
Each toggle's safety depends entirely on the active theme, so caution and periodic rechecking matter here.
Test on a staging copy before an established site
Confirm each toggle's effect somewhere changes are easy to undo before applying it to a live, actively visited site.
Expect Global Styles to stay unavailable on a block theme
If the site runs a block or FSE theme, that specific toggle is automatically skipped rather than applied.
Revisit after a theme change
A new theme may depend on styles the old one didn't, so previously safe toggles are worth re-checking after switching themes.
Leave Duotone SVG Filters on only if the feature is actually unused
Removing it is safe specifically for sites that don't use WordPress's Duotone block feature anywhere.
Avoid rushing the one-at-a-time process
A couple of shortcuts are worth resisting when enabling these toggles.
Enabling all four toggles at once on a live site
The module is built for a one-at-a-time workflow; switching everything on together makes it harder to trace which change caused an issue.
Assuming Global Styles removal always applies
On a block or FSE theme, this specific toggle is automatically skipped, regardless of whether it's switched on in the settings.
Removing Duotone filters on a site that still uses the feature
A Duotone-styled image will lose its color filter if the feature is still in use somewhere on the site.
Remove Block Assets FAQ
These answers come directly from the verified class and its settings registration.
What does Remove Block Assets do?
It removes specific CSS and SVG outputs WordPress adds for the block editor, with each output controlled by its own independent toggle.
Will this break my theme?
The Global Styles toggle is automatically skipped on block or FSE themes to avoid breaking them; the other toggles should be tested one at a time to confirm they're safe for a given theme.
What's the difference between Block Library CSS and Global Styles?
Block Library CSS is the default styling for core blocks like buttons and columns; Global Styles is the inline CSS generated specifically from the theme's theme.json file.
What does Classic Theme Styles remove?
It removes classic-theme-styles, a compatibility stylesheet WordPress has added for classic themes since version 6.1.
Is it safe to remove Duotone SVG Filters?
It's safe on a site that doesn't use the Duotone block feature; removing it while the feature is in use will affect any image relying on a Duotone color filter.
Can I enable just one of the four toggles?
Yes. Each toggle is completely independent of the others.
Does this affect the block editor itself while writing content?
No. These toggles remove front-end output; they don't affect the editing experience in wp-admin.
Will this speed up my site?
It reduces the CSS and SVG sent on every front-end request by a modest but real amount, depending on which toggles are enabled.
What happens if I enable a toggle and it breaks something?
Turning that specific toggle back off restores WordPress's default output immediately.
Who can enable these toggles?
Only an administrator with access to the TheOneWP settings screen.
Stop sending block CSS to a theme that doesn't need it.Remove exactly what your theme doesn't use.
Use Remove Block Assets to drop block library styles, global styles, classic theme styles, or Duotone filters, one at a time, with block themes protected automatically.

