[wp-trac] [WordPress Trac] #54790: Stylesheets enqueued via `wp_enqueue_block_style` should only be enqueued when the block gets rendered

WordPress Trac noreply at wordpress.org
Tue Jan 11 10:28:31 UTC 2022


#54790: Stylesheets enqueued via `wp_enqueue_block_style` should only be enqueued
when the block gets rendered
--------------------------+-----------------------------
 Reporter:  aristath      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The issue was originally reported in
 https://make.wordpress.org/core/2021/12/15/using-multiple-stylesheets-per-
 block/#comment-42320 and a patch in Gutenberg exists in
 https://github.com/WordPress/gutenberg/pull/37848

 In a block theme, styles for blocks only get printed when the block exists
 on a page. However, additional stylesheets enqueued via
 `wp_enqueue_block_style` always get printed.

 More info and testing instructions can be found in the Gutenberg PR on
 https://github.com/WordPress/gutenberg/pull/37848

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54790>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list