[wp-trac] [WordPress Trac] #58519: Inline styles block styles in bundled themes

WordPress Trac noreply at wordpress.org
Tue Sep 16 15:19:39 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      |     Focuses:  performance
---------------------------+--------------------------
Description changed by westonruter:

Old description:

> In [50836] function was added, to inline block styles, so for better
> performance. There are a number of small stylesheets in bundled themes
> that could do with that could use this functionality. To opt-in a
> stylesheet, simply add the path add an extra piece of data of the
> stylesheet. Like this.
>
> {{{#!php
> wp_enqueue_style( 'twentyfifteen-block-style',
> get_template_directory_uri() . '/css/blocks.css', array( 'twentyfifteen-
> style' ), '20230122' );
> wp_style_add_data( 'twentyfifteen-block-style', 'path',
> get_template_directory() . '/css/blocks.css' );
> }}}
>
> This could improve FE performance, as it remove a blocking request.

New description:

 In [50836] function was added, to inline block styles, so for better
 performance. There are a number of small stylesheets in bundled themes
 that could do with that could use this functionality. To opt-in a
 stylesheet, simply add the path add an extra piece of data of the
 stylesheet. Like this.

 {{{#!php
 wp_enqueue_style( 'twentyfifteen-block-style',
 get_template_directory_uri() . '/css/blocks.css', array( 'twentyfifteen-
 style' ), '20230122' );
 wp_style_add_data( 'twentyfifteen-block-style', 'path',
 get_template_directory() . '/css/blocks.css' );
 }}}

 This could improve FE performance, as it remove a blocking request.

 Blocked by: #63012

--

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


More information about the wp-trac mailing list