[wp-trac] [WordPress Trac] #65277: Gutenberg Gallery Flex Styles Missing

WordPress Trac noreply at wordpress.org
Wed May 20 14:32:28 UTC 2026


#65277: Gutenberg Gallery Flex Styles Missing
-------------------------------+------------------------------
 Reporter:  carbondigitalus    |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  6.9.4
 Severity:  normal             |  Resolution:
 Keywords:  needs-patch        |     Focuses:  ui, css
-------------------------------+------------------------------

Comment (by carbondigitalus):

 Thanks for checking. The is-layout-flex class and its associated styles
 are generated dynamically by the block editor's JavaScript — they are not
 part of the core gallery stylesheet. In environments where that JS
 pipeline is interrupted (e.g. third-party page builders rendering blocks
 server-side), is-layout-flex styles may not load, and since the gallery
 stylesheet has no display: flex of its own, the layout breaks entirely.
 The issue is that style.min.css is incomplete — it defines flex-dependent
 properties like justify-content and flex-wrap for .wp-block-gallery.has-
 nested-images but never declares display: flex itself. The stylesheet
 should not rely on a separate dynamically-injected class to establish the
 flex context that its own rules depend on.

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


More information about the wp-trac mailing list