How to Remove Gutenberg CSS

ou need to remove the -css when trying to dequeue the script. That’s added to the HTML markup and not the actual tag for the css file.

If you search the code (the location of the enqueue may change as Gutenberg gets rolled into core), you can find:

[php]wp_enqueue_style( ‘wp-block-library’ )[/php]

As you can see, there is no -css. This solution may work for other plugins that people have trouble dequeuing styles.

Edit: Since this still gets some traction, here is the code to handle it:

[php]add_action( ‘wp_print_styles’, ‘wps_deregister_styles’, 100 );
function wps_deregister_styles() {
wp_dequeue_style( ‘wp-block-library’ );
}[/php]

Leave a Comment