Hi,
I’d like to load the editor-stylesheet in my child theme after generate-block-editor-styles-inline-css.
This post suggests that it should be loaded last. But I guess that’s for the front-end, since in the editor it loads before the gp inline styles.
I’m enqueuing my editor-stylesheet according to this post. And I tried to name generate-block-editor-styles-inline-css as a handle, but that failed and let my editor-stylesheet disappear.
The following code returns my editor-stylesheet before the inline css.
function my_editor_styles(){
wp_enqueue_style( 'my-editor-style-handle', get_stylesheet_directory_uri() . "/theme-styles/editor-styles.css", false, '1.0', 'all' );
}
add_action( 'enqueue_block_editor_assets', 'my_editor_styles');
The following code makes my editor-stylesheet disappear.
function my_editor_styles(){
wp_enqueue_style( 'my-editor-style-handle', get_stylesheet_directory_uri() . "/theme-styles/editor-styles.css", array( 'generate-block-editor-styles-inline-css' ), '1.0', 'all' );
}
add_action( 'enqueue_block_editor_assets', 'my_editor_styles');
Any suggestions for a solution? Right now I’m using !important, but that’s pretty ugly.
Thanks in advance.