To facilitate how I visually modify a page, by code I am adding a class to certain elements that I want to mark. By adding .marcado
, they look like this:
/* CSS de la página */
p {
font-size: 18pt;
text-decoration: underline double darkorange;
}
/* CSS inyectado por mi extensión */
p.marcado::after {
content: 'marca';
margin-left: 2ch;
background-color: black;
color: white;
text-decoration: none; /* ESTO NO ME FUNCIONA !!!!! */
}
<p>Párrafo uno</p>
<p class="marcado">Párrafo dos</p> <!-- Acá le agregué la clase -->
<p class="marcado">Párrafo tres</p> <!-- Acá le agregué la clase -->
<p>Párrafo cuatro<p>
I can not make the underline of text-decoration
remain in the paragraph and not appear in the pseudo element ::after
.
I want to avoid adding them as independent elements (for example in a <span>
).
How can I make the paragraph stay underlined and the "mark" does not?