SOLVED: Links in Gutenberg have no visible formatting (:where(a) reset in editor iframe)

After updating to Bricks 2.4.1, links in Gutenberg look like normal text (no color/underline). Before 2.4 they were fine.

Verified on two separate installations — same issue after the 2.4.1 update.

DevTools shows Bricks overriding default link styles in the editor iframe:

.block-editor-iframe__body :where(a) {
  color: currentColor;
  text-decoration: none;
}

Tried: components disabled, CSS regenerate, “Disable Bricks theme styles in the block editor” → no change (rule comes from Bricks default/frontend styles, not Theme Styles link selectors).

Related but different: Theme Styles injection threads (#40388, #40395). This is specifically the core :where(a) reset making content links unreadable in the editor.

Expected: visible link formatting in Gutenberg, as before 2.4.1.

Hey @stabilo,

thank you, I was able to replicate it and I’ve added it to our internal bug tracker.

Best regards,
Matej

We’ve addressed this in Bricks 2.4.2, now available as a one-click update in your WordPress Dashboard.

Please read the changelog entry before updating, and let us know if you experience any issues.

This appears to still be an issue in Bricks 2.4.2

It’s been working for me since version 2.4.2

You don’t have these inline styles?

.block-editor-iframe__body :where(a) {
   border-color: currentcolor;
   color: currentcolor;
   cursor: pointer;
   text-decoration: none;
}

It has been overwritten since version 2.4.2.

Hmm I’m not seeing that at all

Do you have “Disable Bricks theme styles in the block editor” toggled off? If I do that, it’s as you describe. I have it disabled because of another issue with paragraph spacing and contextual spacing. What I want is for Bricks to leave the styling alone and let the default WordPress styles work in Gutenberg.

Yeah, exactly—I have that feature turned off.

Bricks 2.4.2 didn’t solve it for me. What saved my day was this php snippet added in the theme functions.php file

add_action('enqueue_block_assets', function () {
    if (!is_admin()) {
        return;
    }

    wp_register_style('gutenberg-links', false);
    wp_enqueue_style('gutenberg-links');

    wp_add_inline_style(
        'gutenberg-links',
        '
        .editor-styles-wrapper a {
            color: #2271b1;
            text-decoration: underline;
        }
        '
    );
});

Hope this will help somebody.

Thanks for reporting the remaining link-formatting issue after the 2.4.2 update. Bricks 2.4.3 addresses this follow-up case: native Gutenberg links retain their visible color and underlines even when no Link Theme Styles are configured.

Bricks 2.4.3 is now available as a one-click update in your WordPress Dashboard.

Please read the changelog entry before updating, and let us know if you experience any issues.

It seems 2.4.3 solved it. I can safely remove my snippet from the functions.php file. Thank you.