Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#55369 new defect (bug)

Block styles preview are unstyled since 5.9 if styles are in a global editor styles css

Reported by: johndbb's profile JohnDBB Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.9.1
Component: Editor Keywords: reporter-feedback
Focuses: Cc:



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

Change History (2)

#1 @costdev
2 years ago

  • Component changed from General to Editor
  • Keywords reporter-feedback added

Hi @JohnDBB, welcome to Trac!

Can you please install the latest version of the Gutenberg plugin and if the issue still occurs, please open an issue on the Gutenberg repository to allow the team to investigate this further.

If you do create an issue on the Gutenberg repository, please paste the link into a new comment on this ticket. If you don't plan to create an issue, please let us know. I'll leave this ticket open until then.

#2 @JohnDBB
2 years ago

Thank you @costdev I have installed the latest version of the Gutenberg plugin and it seems that they have completely removed the styles preview! Now there are just buttons with the name of the style on them.

Note: See TracTickets for help on using tickets.