[wp-trac] [WordPress Trac] #64099: Load block styles on demand in classic themes via template enhancement output buffer

WordPress Trac noreply at wordpress.org
Wed Oct 22 11:16:53 UTC 2025


#64099: Load block styles on demand in classic themes via template enhancement
output buffer
----------------------------------------+--------------------------
 Reporter:  westonruter                 |       Owner:  westonruter
     Type:  enhancement                 |      Status:  closed
 Priority:  normal                      |   Milestone:  6.9
Component:  Script Loader               |     Version:
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  has-patch needs-unit-tests  |     Focuses:  performance
----------------------------------------+--------------------------

Comment (by Soean):

 Hi,
 we remove the `wp-block-library` styles from our site:

 {{{#!php
 <?php
 add_action(
         'enqueue_block_assets',
         function (): void {
                 wp_deregister_style( 'wp-block-library' );
                 wp_register_style( 'wp-block-library', '' );
         }
 );
 }}}

 Like others:
 - https://github.com/search?q=wp_deregister_style%28+%27wp-block-
 library%27+%29%3B&type=code
 - https://github.com/search?q=wp_dequeue_style%28+%27wp-block-
 library%27+%29&type=code

 With WP 6.9-Beta1 we don't get the `global-styles-inline-css` styles
 anymore, which breaks our styles.

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


More information about the wp-trac mailing list