Hello! Yes, this is true. Originally the stylesheets were being printed conditionally when the Code block was printed, but this caused problems: https://github.com/westonruter/syntax-highlighting-code-block/issues/286
So in https://github.com/westonruter/syntax-highlighting-code-block/pull/785 I switched it to register styles in the standard way.
If you’re using a Block theme, then the styles will continue to be conditionally included based on whether the Code block is on the page. For a Classic theme, however, this is not the default behavior for block styles. To opt-in, you have to add this code:
add_filter( 'should_load_separate_core_block_assets', '__return_true' );
When you do this, all of the blocks on your site will start to be conditionally printed, not just the ones from the Code block. The downside is that the stylesheets are printed in the footer since in a Classic theme WordPress doesn’t know which blocks will be used before hand.
Let me know if this addresses the issue.
Thanks for that suggestion. I’m using a ‘Frankentheme’, a theme I’ve had for years which I made block-friendly several years ago.
Adding that filter removes the css and as far as I can tell has brought no adverse affects. So let’s say it’s worked 😉