/* Remove Block Library CSS */
function wpflt_remove_wp_block_library_css(){
wp_dequeue_style( 'wp-block-library' );
wp_dequeue_style( 'wp-block-library-theme' );
wp_dequeue_style( 'wc-blocks-style' );
}
add_action( 'wp_enqueue_scripts', 'wpflt_remove_wp_block_library_css', 100 );
Here is how you remove the unused block library CSS, /wp-includes/css/dist/block-library/style.min.css
By default Gutenberg Block Editor creates a CSS request (90% of which is generally unused). The request size is 12.4KB which is extremely heavy and is a part of reason for slow page loading speed.
In order to disable the Block Library CSS request during each page load, add the above code to your child theme’s theme functions.
Warning: Your CSS will break. No Worries! Add custom CSS to each block (if needed) utilizing Additional Classes.
If you have images on your site, they will loose alignment. Use CSS and extra classes to re-align them.