I am working on removing the default Gutenberg block library stylesheet and replacing it with custom pared-down styles. I do not want the original stylesheet to load on either the front or back end, as it means I'd need to add unnecessary bulk to the custom styles in order to override styles in the default stylesheet.
I've successfully dequeued the styles from the front end using the standard in a wp_enqueue_scripts
action:
function test_function(){
wp_dequeue_style('wp-block-library');
}
add_action( 'wp_enqueue_scripts', 'test_function' );
However, this does not dequeue the styles from the block editor. I have tried dequeuing from an admin_init
action as well, and that also does not remove the styles from the block editor.
Is it possible to dequeue this stylesheet from both the front-end and the admin block editor?