Text links style broken in editor

Cwicly Plugin version: 1.2.9.4.1

Hi,

A recent update in Cwicly’s global styles broke my text links inside editor:

I might be (again!) missing something with specificity, but I think these rules shoudn’t overide stylesheet CSS.
(And even if I change :where into :is, the transition rule is still overriden.)

And as the rules are already in base.css, I think they shouldn’t be added again here.

Hi @yankiara,

Thanks for this, although I do believe this has been present for quite some time in Cwicly.

You certainly have a point about these styles being too specific where they’re placed, but they are necessary as Gutenberg doesn’t enqueue the base.css file before adding its own styling to the links…
So we have to null those again.
Maybe following the .editor-styles-wrapper a:where(:not(.wp-element-button)) instead of the .editor-styles-wrapper a rule would be the way to go here for us.

I see what you mean, but it seems the rules you want to nullify are:

.editor-styles-wrapper a:where(:not(.wp-element-button)) {
  text-decoration: underline;
}
html :where(.editor-styles-wrapper) a {
  transition: none;
}

And I guess people style their text links anyway, either with Cwicly’s UI (global styles, global/external classes, etc.) or custom CSS (like me), so this will be naturally overiden.

For instance, I do style my text links with rules like 'p a { ... }' my buttons with .cc-btn and my card links with 'a.post-thumb', so I don’t care about WP default.

And I would not be shocked that my links are underlined by default if I haven’t styled them :wink:

But maybe I don’t see all impacts, here.

OK yes I see an issue with the WP text-decoration rule, which is very invasive, even on frontend:

Everything inside a card link is underlined, because text-decoration is inherited!

(See this discussion: Standard blocks background and text colors are not applied on frontend)

Well, this dual editor/frontend rendering is a real headache puzzle :rofl: