I want to style an element based on the text that is written inside of it.
<div class="target-element">
Cat
</div>
And if I was guessing how the CSS should look:
.target-element[content="Cat"] {
background-color: red;
}
This doesnt work of course ^^ , which is where the help comes in.