Ollie Theme Academy

Styling with CSS

enqueue_block_editor_assets hook – B

WordPress 6.3 introduced a compatibility mode for stylesheets enqueued via enqueue_block_editor_assets that contain specific selectors. This provides a transition period for existing themes and plugins.

The compatibility mode triggers when WordPress detects three specific selectors in your stylesheet: .wp-block (applied to all blocks), block-specific classes (like .wp-block-paragraph), or .editor-styles-wrapper (the editor container).

When triggered, WordPress automatically injects the stylesheet into the iframe editor using JavaScript, so styles get loaded in both the admin page and the editor content area.

This is a temporary compatibility measure. While your styles may still work in 6.3+, you should migrate to proper editor styling methods like add_editor_style() or theme.json styles for long-term reliability.

Back to: Ollie Theme Academy > Styling with CSS