I'd like to achieve the following effect, where the green marker in the background should also respect line wraps. This means that in contrast to questions like this one, the marker effect should not span the entire height of the text, but just the bottom part:
Currently, I already managed to do it like this, but the top edges of the underline are not rounded here, because the border-radius
obviously cannot affect those. How can I fix this?
.highlighted {
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0) 60%,
rgba(154, 216, 215, 1) 60%,
rgba(154, 216, 215, 1) 100%
);
padding: 0 0.5rem;
line-height: 2;
font-size: 2rem;
display: inline;
font-weight: bold;
box-decoration-break: clone;
-webkit-box-decoration-break: clone;
max-width: 100vw;
border-radius: 8px;
}
<div class="highlighted">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo
ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis
dis parturient
</div>