[wp-trac] [WordPress Trac] #58519: Inline styles block styles in bundled themes
WordPress Trac
noreply at wordpress.org
Tue Feb 25 19:50:03 UTC 2025
#58519: Inline styles block styles in bundled themes
-----------------------------------+--------------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.9
Component: Bundled Theme | Version: 5.8
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses: performance
-----------------------------------+--------------------------
Comment (by westonruter):
Also as I [https://core.trac.wordpress.org/ticket/63007#comment:8
commented] on #63007:
> I think a better approach for inlining classic themes' `blocks.css`
would be to split up the stylesheet into multiple stylesheets, one for
each block. Then if we can enable `should_load_separate_core_block_assets`
for classic themes, then we can only enqueue the specific theme block
styles which are actually used via `wp_enqueue_block_style()`. This would
require the use of output buffering from #43258 (which I've just
milestoned for 6.8), however, since we'd need to inject the CSS from the
`head` after the rest of the template has been rendered. Maybe the themes'
blocks stylesheets can't be split up so easily, however.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58519#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list