Ollie Theme Academy

Styling with CSS

enqueue_block_editor_assets hook – A

The enqueue_block_editor_assets hook behavior changed dramatically in WordPress 6.3 due to the iframe implementation. Previously, styles added via this hook affected both the admin page and the content editor.

In WordPress 6.2 and earlier, this caused two problems: WordPress had to actively reset admin styles that bled into the editor, and any unscoped styles would affect the entire admin interface beyond just the editor.

With WordPress 6.3’s iframe implementation, styles enqueued via enqueue_block_editor_assets only affect the admin page, not the isolated editor content. This breaks existing styling but solves the style bleeding problems.

The solution is to use proper editor styling methods: the add_editor_style() function or the styles section in theme.json. These methods work consistently across all WordPress editors.

Back to: Ollie Theme Academy > Styling with CSS