• I’m testing the WordPress 6.1 update which was just released today and have noticed that after the update (and clearing caches etc…) many links are underlined even though they weren’t prior to the update. Not sure if this is something with Astra & WordPress 6.1 or whether it is all themes, as my sites all use Astra. Thought I’d mention it though as I am seeing it so far on every test site I have used. It’s most noticeable on the site title in the header and also any footer links using footer widgets etc…

    On inspection, I see this in the CSS:

    a:where(:not(.wp-element-button)) {
        text-decoration: underline;
    }

    This code does not exist prior to the 6.1 update and is overriding the Astra CSS (it’s 2nd in the hierarchy list of CSS when inspecting a link).

    Adding the opposite code in custom CSS is a workaround for others facing this issue until it’s resolved.

    a:where(:not(.wp-element-button)) {
        text-decoration: none;
    }
    • This topic was modified 1 year, 5 months ago by CGS Web Designs.
    • This topic was modified 1 year, 5 months ago by CGS Web Designs. Reason: Adding CSS block
Viewing 8 replies - 1 through 8 (of 8 total)
  • I have the same problem: https://closertotheedge.uk/. Thanks for the fix.

    • This reply was modified 1 year, 5 months ago by tonyurwin.

    Yes, same problem as of same update done today. Will try the fix in a bit but need it to be broken for Brtainstorm to see first, I submitted a support ticket.

    ..and just as I wrote the above Brainstorm emailed with a similar fix:

    a:where(:not(.wp-element-button)) {
        text-decoration: unset;
    }
    Fabio

    (@reteinformatica)

    I also have the same problem: the name of the site and the buttons in the header are underlined after WordPress 6.1 update.
    https://www.studioglobale.it/
    https://www.fabiobernini.it/

    • This reply was modified 1 year, 5 months ago by Fabio.
    • This reply was modified 1 year, 5 months ago by Fabio.
    • This reply was modified 1 year, 5 months ago by Fabio.

    Hi,

    I’m Mehedi Hasan from the Astra team, and I apologize for the inconvenience.

    Along with the other changes, text-decoration: underline came with WordPress 6.1, and we are currently working on the best possible solution for this.

    We hope to release an update soon; please bear with us until then. Or, in the meantime, you can use the following solution.

    a:where(:not(.wp-element-button)) {
        text-decoration: none;
    }
    Fabio

    (@reteinformatica)

    Thank you, Astra update solved the problem.

    Thanks for confirming @reteinformatica.

    @cgscomputers, since this issue has been fixed in v3.9.3, please mark this thread as Resolved.

    Kind regards,
    Herman 😊

    Stumbled upon the same issue. Didn’t want to do the css override. I didn’t want to have the css rule in the first place. This piece of php will remove the piece of css from the css output:

    add_filter( 'wp_theme_json_get_style_nodes', function($nodes) {
        if (!is_array($nodes)) {
            return $nodes;
        }
    
        $nodes = array_filter($nodes, function ($node) {
            if (
                !empty($node['selector']) &&
                $node['selector'] == 'a:where(:not(.wp-element-button))'
            ) {
                return false;
            }
    
            return true;
        });
    
        return $nodes;
    });
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WordPress 6.1 Update Forces Underline on Links’ is closed to new replies.