#61661 closed defect (bug) (duplicate)
WordPress 6.6 display all links as underlined
| Reported by: | simonbelley | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Editor | Version: | 6.6 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | ui, css |
Description
Since the update of WordPress 6.6 the css line: :root :where(a:where(:not(.wp-element-button))){text-decoration:underline;} broke all of my websites designs by adding underline on every links.
Change History (9)
#2
follow-up:
↓ 3
@
2 years ago
It's clearly not a browser behaviour since it's a css line that has been added to wordpress core in the update. Hope they fix that soon! I have multiple website and don't want to go on each one to add a css line that would override it...
#3
in reply to: ↑ 2
@
2 years ago
Replying to simonbelley:
It's clearly not a browser behaviour since it's a css line that has been added to wordpress core in the update. Hope they fix that soon! I have multiple website and don't want to go on each one to add a css line that would override it...
No, but that was their reason for introducing that CSS rule.
30 years ago, links were, indeed, underlined and blue. This doesn't mean we need to have them like that.
#4
@
2 years ago
- Component General → Editor
- Milestone Awaiting Review
- Resolution → duplicate
- Severity major → normal
- Status new → closed
Duplicate of #61660.
Closing as this was already reported & resolved.
#5
@
2 years ago
This is how I solved it, in case anyone stumbles upon this ticket. I put the code below in my theme:
:root :where(a:where(:not(.wp-block-navigation))),
:root :where(a:where(:not(.wp-element-button))) {
text-decoration: initial;
}
#7
in reply to: ↑ 1
@
2 years ago
Replying to butterflymedia:
I have already opened a ticket on the block editor on GitHub, and they said there is a hotfix for 6.6.1. Here is the link - https://github.com/WordPress/gutenberg/issues/63345
Still, there is a bunch of
:rootand:wherestyles overriding everything. Another example would be all centred images are now left aligned.
Regarding the underline, their reply was that this is common behaviour for browsers to underline links…
Here is the selector being added by the core:
:root :where(a:where(:not(.wp-element-button))) { text-decoration: underline; }
#9
@
2 years ago
The filter below fixed the entire issue for me:
add_action(
'wp_head',
function () {
global $wp_styles;
if ( ! empty( $wp_styles->registered['global-styles']->extra['after'][0] ) ){
$wp_styles->registered['global-styles']->extra['after'][0] = str_replace(
[
':root :where',
':root',
':where',
],
'',
$wp_styles->registered['global-styles']->extra['after'][0]
);
}
},
1
);
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I have already opened a ticket on the block editor on GitHub, and they said there is a hotfix for 6.6.1. Here is the link - https://github.com/WordPress/gutenberg/issues/63345
Still, there is a bunch of
:rootand:wherestyles overriding everything. Another example would be all centred images are now left aligned.Regarding the underline, their reply was that this is common behaviour for browsers to underline links…
Here is the selector being added by the core:
:root :where(a:where(:not(.wp-element-button))) { text-decoration: underline; }