Core loading a bunch of block styles, even when not needed
-
I just noticed that (not sure since when/what release) WP Core loads a whole lot of
wp-blocks
related CSS in the front end, even if my theme does not make a single usage of any block, nor does any post (in fact, the classic editor plugin is installed and active).This is the style sheet loaded:
wp-includes/css/dist/block-library/style.min.css?ver=6.0.2
Is it expected that this style is loaded even if blocks are never used?
(again, note that there is not even a single block used on the website. Neither in posts, nor in widgets, or in the theme. WP is used only as a CMS, not as a page builder, on this project).While not a showstopper, I feel this is a bit trespassing.
Perhaps I miss something, like “we cannot detect if a block is actually ever used so we just load a bunch of CSS just in case”?
In that case, I still would consider this a “doing it wrong”. Loading CSS “just because” has never been the best approach.
- The topic ‘Core loading a bunch of block styles, even when not needed’ is closed to new replies.