Simplest methode would be to disable SCRIPT_DEBUG in wp-config.php like this:
define( 'SCRIPT_DEBUG', false );
Thread Starter
Aaron
(@jstask)
Thanks a lot! I never thought of it being put in because of debugging.
This does not work for me.
I have set define( ‘SCRIPT_DEBUG’, false ) in the config, but the style tags still remain.
<style>.wp-block-gallery.wp-block-gallery-2{ --wp--style--unstable-gallery-gap: var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) ); gap: var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )}</style>
<style id='core-block-supports-inline-css' type='text/css'>
.wp-block-columns.wp-container-6{flex-wrap:nowrap;}
</style>
</div>
</div>
</body>
</html>
The styles of the gallery block are also there.
Any Idea?
Thank you!
-
This reply was modified 2 years, 4 months ago by
syntcom.
Tried it with a fresh install again. And it works as expected.
Seems to be caused by the theme or a plugin. No need to investigate this any further.
I have the same issue (WordPress 6.1.1). It seems to be a problem with the theme which comes from one.com. Can anyone suggest any solution?
The inline CSS with “core-block-supports-inline-css” ID only appears on the homepage.
I’ve checked the theme’s files, and it seems it only checks “SCRIPT_DEBUG” constant, but never try to define it.
Any ideas what can fire this CSS up?
add_action('wp_footer', function () {
wp_dequeue_style('core-block-supports');
});
Awesoome! The only approach that really works. Thank you @vguerrerobosch.