I see that bricks is adding the following to the printed inline styles for the block library:
:where(figure) {
margin: 0;
}
I would like to remove this but it is added via an anonymous function so I can’t use remove_action()
I’d be grateful if this could be reworked so that we can more easily opt out of having inline styles printed to the page - in cases where we don’t want the overrides it’s a bit frustrating because we have to override a bricks override of the defaults. In my case I actually want the default…
For the moment I have fixed it with the following code hooked late to wp_enqueue_scripts:
function removeBlockLibraryInlineStyles()
{
global $wp_styles;
$handle = 'wp-block-library';
if (isset($wp_styles->registered[$handle]->extra['after'])) {
unset($wp_styles->registered[$handle]->extra['after']);
}
}