[wp-trac] [WordPress Trac] #64166: Twenty Twenty: Update theme to add Gutenberg styles separately and on-demand

WordPress Trac noreply at wordpress.org
Tue Nov 4 07:53:41 UTC 2025


#64166: Twenty Twenty: Update theme to add Gutenberg styles separately and on-
demand
---------------------------+-------------------------------
 Reporter:  westonruter    |       Owner:  westonruter
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Bundled Theme  |     Version:  5.3
 Severity:  normal         |  Resolution:  invalid
 Keywords:  has-patch      |     Focuses:  css, performance
---------------------------+-------------------------------

Comment (by westonruter):

 In [changeset:"61122" 61122]:
 {{{
 #!CommitTicketReference repository="" revision="61122"
 Script Loader: Load block styles on demand in classic themes even when
 `wp-block-styles` support is absent.

 This reverts part of [61076] which made `wp-block-styles` theme support a
 precondition for opting in to `should_load_separate_core_block_assets` and
 `should_load_block_assets_on_demand`. This meant that the Twenty Twenty
 theme (and other themes without this support declared) would not benefit
 from on-demand block style loading. Nevertheless, even though such themes
 were not getting block styles loaded on demand, the
 `wp_load_classic_theme_block_styles_on_demand()` function was proceeding
 to opt in to the output buffer for hoisting late-printed styles, even
 though it was unlikely there would then be any. This meant the template
 enhancement output buffer was being opened for no reason.

 Enabling on-demand block style loading is measured to improve FCP and LCP
 in Twenty Twenty, for example a ~13% improvement over a Fast 4G connection
 when loading the Sample Page.

 Developed in https://github.com/WordPress/wordpress-develop/pull/10457

 Follow-up to [61008], [61076], [60936].

 Props westonruter.
 See #64099, #64150, #64166, #43258.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64166#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list