Skip to content

Commit 67bc44b

Browse files
committed
Editor: Update enqueued styles in the editor.
Updates the enqueued styles in various editors to remove target styles more precisely to where they are needed. Removes the following stylesheets as dependencies of `wp-edit-blocks`: * `wp-editor` * `wp-reusable-blocks` * `wp-patterns` The `wp-editor` stylesheet is targeted to the items requiring the CSS: * `edit-widgets` * `customize-widgets` * `edit-site` Props ellatrix, youknowriad. Fixes #62266, #62274. git-svn-id: https://develop.svn.wordpress.org/trunk@59793 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3205934 commit 67bc44b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/wp-includes/script-loader.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,18 +1680,16 @@ function wp_default_styles( $styles ) {
16801680
array( 'wp-components' )
16811681
);
16821682

1683+
// Only add CONTENT styles here that should be enqueued in the iframe!
16831684
$wp_edit_blocks_dependencies = array(
16841685
'wp-components',
1685-
'wp-editor',
16861686
/*
16871687
* This needs to be added before the block library styles,
16881688
* The block library styles override the "reset" styles.
16891689
*/
16901690
'wp-reset-editor-styles',
16911691
'wp-block-library',
1692-
'wp-reusable-blocks',
16931692
'wp-block-editor-content',
1694-
'wp-patterns',
16951693
);
16961694

16971695
// Only load the default layout and margin styles for themes without theme.json file.
@@ -1750,24 +1748,25 @@ function wp_default_styles( $styles ) {
17501748
'edit-widgets' => array(
17511749
'wp-widgets',
17521750
'wp-block-editor',
1751+
'wp-editor',
17531752
'wp-edit-blocks',
17541753
'wp-block-library',
1755-
'wp-reusable-blocks',
17561754
'wp-patterns',
17571755
'wp-preferences',
17581756
),
17591757
'customize-widgets' => array(
17601758
'wp-widgets',
17611759
'wp-block-editor',
1760+
'wp-editor',
17621761
'wp-edit-blocks',
17631762
'wp-block-library',
1764-
'wp-reusable-blocks',
17651763
'wp-patterns',
17661764
'wp-preferences',
17671765
),
17681766
'edit-site' => array(
17691767
'wp-components',
17701768
'wp-block-editor',
1769+
'wp-editor',
17711770
'wp-edit-blocks',
17721771
'wp-commands',
17731772
'wp-preferences',

0 commit comments

Comments
 (0)