diff --git a/lib/client-assets.php b/lib/client-assets.php index b7537057b89ab..258acd97599a9 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -337,7 +337,15 @@ function gutenberg_register_packages_styles( $styles ) { global $editor_styles; if ( current_theme_supports( 'wp-block-styles' ) && ( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 ) ) { // Include opinionated block styles if the theme supports block styles and no $editor_styles are declared, so the editor never appears broken. - $wp_edit_blocks_dependencies[] = 'wp-block-library-theme'; + + gutenberg_override_style( + $styles, + 'wp-block-library-theme', + gutenberg_url( 'build/block-library/theme.css' ), + array(), + $version + ); + $styles->add_data( 'wp-block-library-theme', 'rtl', 'replace' ); } gutenberg_override_style( @@ -367,15 +375,6 @@ function gutenberg_register_packages_styles( $styles ) { ); $styles->add_data( 'wp-edit-blocks', 'rtl', 'replace' ); - gutenberg_override_style( - $styles, - 'wp-block-library-theme', - gutenberg_url( 'build/block-library/theme.css' ), - array(), - $version - ); - $styles->add_data( 'wp-block-library-theme', 'rtl', 'replace' ); - gutenberg_override_style( $styles, 'wp-list-reusable-blocks',