Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block editor: separate content styles for the iframe (PHP backport) #3903

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/wp-includes/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);

Expand Down
7 changes: 7 additions & 0 deletions src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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.
Expand Down