Front-End & Daily

How to remove WordPress "core-block-supports-inline-css"

How to remove WordPress

Appeared suddenly just before </body> in WordPress version 6

Here's how to remove this CSS.

<style id='core-block-supports-inline-css' type='text/css'>
.wp-container-4.wp-container-4{flex-wrap:nowrap;}.wp-block-gallery.wp-block-gallery-5{--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>

Add to functions.php

Adding the following will remove it.

// Remove core-block-supports-inline-css
add_action('wp_footer', function () {
    wp_dequeue_style('core-block-supports');
});

Reference : https://wordpress.org/support/topic/core-block-supports-inline-css/

What is this?

There isn't much information available yet, but

This tag is only output on pages that use the block editor's "Columns" or flex-related layouts.

WordPress Block Editor Columns

If it doesn't bother you, you can leave it as is; if it's in the way, I think it's fine to remove it.

Comments

After reviewing the content, we will publish it, omitting personal information.

Enter your name and email address

Please enter if you would like a reply by email.

Personal information provided will not be disclosed. It will only be used for replies.

It will be sent directly. Please confirm and click 'Send'.

If this was helpful, we appreciate your support!
Any support received will be used for childcare.

OFUSEで応援を送る


Or support us by buying something from the buttons below
(You don't have to buy the linked product.)

Amazon

楽天市場

Yahoo!ショッピング

PR

As an Amazon Associate, 'けん' earns from qualifying purchases.

Share

Share on Twitter Share on Facebook Share on LINE Share on Hatena Bookmark