Custom styles of core/group invisible in editor #20140
Labels
[Block] Group
Affects the Group Block (and row, stack and grid variants)
[Status] In Progress
Tracking issues with work in progress
[Type] Regression
Related to a regression in the latest release
Describe the bug
Before activating the Gutenberg plugin (working in WordPress 5.3.2) I could use JS or PHP to add a custom style to the core/group block and the backend would provide a "is-style-XXX" class to the group. This is still working in the website, but not in the editor when I activate the Gutenberg Plugin.
To reproduce
Steps to reproduce the behavior:
Add this JS:
registerBlockStyle( 'core/group' , { name: 'golden-border', label: __( 'Golden Border' ), });
or this PHP:
register_block_style( 'core/group', [ 'name' => 'golden-border', 'label' => 'Golden Border', 'style_handle' => 'block-styles-stylesheet', ] );
to a theme, without installing Gutenberg Plugin.
Add this to the stylesheet of the theme
.wp-block-group.is-style-golden-border { border: 2px solid #caa071; (...) }
Add this to the theme:
add_theme_support( 'editor-styles' );
Expected behavior
Both in the website and in the editor a 2px border should appear around the group if I select the style for a group. This happens if I disable the plugin, but with the plugin enabled, the is-style-golden-border class is gone.
Screenshots


Fragments of editor with Gutenberg plugin disabled
Fragments of editor with Gutenberg plugin enabled


Fragment of the website (identical in both cases)

Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: