[wp-trac] [WordPress Trac] #55369: Block styles preview are unstyled since 5.9 if styles are in a global editor styles css

WordPress Trac noreply at wordpress.org
Fri Mar 11 05:45:10 UTC 2022


#55369: Block styles preview are unstyled since 5.9 if styles are in a global
editor styles css
--------------------------+-----------------------------
 Reporter:  JohnDBB       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.9.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hello,

 Block stlyes registered with


 {{{
     wp.blocks.registerBlockStyle( 'acf/featured-news', {
         name: 'featured-news-black',
         label: 'Featured news black',
         isDefault: false,
     } );
 }}}

 Editor stylesheet enqueued with:


 {{{
 function legit_block_editor_styles() {
         wp_enqueue_style( 'legit-editor-styles', get_theme_file_uri(
 '/style-editor.css' ), false, '11.0', 'all' );
 }

 add_action( 'enqueue_block_editor_assets', 'legit_block_editor_styles' );
 }}}

 Since WordPress 5.9 the iframe that shows the block styles show them
 unstyled as doesn't include the style-editor.css

 Thank you

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


More information about the wp-trac mailing list