[wp-meta] [Making WordPress.org] #8222: Properly enqueue block style_handles in pattern editor

Making WordPress.org noreply at wordpress.org
Mon Apr 6 12:55:35 UTC 2026


#8222: Properly enqueue block style_handles in pattern editor
--------------------------+-----------------------
 Reporter:  bor0          |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:
Component:  General       |   Keywords:  has-patch
--------------------------+-----------------------
 The function `_wp_get_iframed_editor_assets` enqueues
 editor_style_handles, but not style_handles.

 In the admin editor, frontend styles are already on the page, so this
 works. In a frontend block editor (e.g. Pattern Creator), they are never
 loaded, breaking blocks like Cover that rely on them for canvas
 layout/background CSS.

 Additionally, `__unstableIframe` dropped its `head` prop in Gutenberg
 22.x, preventing `EditorStyles` from injecting theme styles into the
 canvas (fonts, CSS custom properties, etc.).

 The proposed patch here carries workarounds for both:
 - PHP: hooks into enqueue_block_assets to enqueue style_handles inside the
 capture window
 - JS: moves EditorStyles from the head prop to a child of Iframe

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/8222>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list