From ba2eeaebe9f9e9fa8dc8d6cef33ca34415a632a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Wed, 25 Jan 2023 10:22:33 +0100 Subject: [PATCH] Block editor: separate content styles for the iframe --- src/wp-includes/block-editor.php | 2 -- src/wp-includes/script-loader.php | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/block-editor.php b/src/wp-includes/block-editor.php index 4227c674c02ff..39debd983b90a 100644 --- a/src/wp-includes/block-editor.php +++ b/src/wp-includes/block-editor.php @@ -318,8 +318,6 @@ function _wp_get_iframed_editor_assets() { $script_handles = array(); $style_handles = array( - 'wp-block-editor', - 'wp-block-library', 'wp-edit-blocks', ); diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index de52578936989..63f5c4fe28f39 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -1609,6 +1609,12 @@ function wp_default_styles( $styles ) { array() ); + $styles->add( + 'wp-block-editor-content', + "/wp-includes/css/dist/block-editor/content$suffix.css", + array() + ); + $wp_edit_blocks_dependencies = array( 'wp-components', 'wp-editor', @@ -1617,6 +1623,7 @@ function wp_default_styles( $styles ) { 'wp-reset-editor-styles', 'wp-block-library', 'wp-reusable-blocks', + 'wp-block-editor-content', ); // Only load the default layout and margin styles for themes without theme.json file.