Text-decoration hover properties from parent on links?
-
I’m trying to stylize a link underline effect that comes to starts when mouse hovers over the parent element, unsuccesfully. I’m doing this through Additional CSS Class by adding this to the parent:
.hover-on-block:hover {
text-decoration: underline;
text-decoration-color: red;
text-underline-offset: -50%;
text-decoration-thickness: 75%;
text-decoration-skip-ink: none;
}It underlines every piece of the text BUT the post title link. For some reason the effect works on the author if I make it a link in Block Editor BUT NOT on the title if it’s a link. This is all on Query Loop block btw.
Also if I change it to this
.hover-on-block a:hover {
it affects the title link BUT only when I hover over the link itself (this is probably obvious). Thethickness
is also default and not the 75% (or like 20 pixels, I tested) for some reason even thoughdecoration-color
andoffset
work.Help is appreciated, and here’s a couple smaller questions:
- How can I set the rest of the text to ignore this
text-decoration
? - When you activate links in this theme there’s a black border around the link — how can I change this property by default?
- How can I set the rest of the text to ignore this
- You must be logged in to reply to this topic.