I have a scenario to apply color to all descendants except the anchor tag <a>
.
.texts *:not(a) {
color: red;
}
<div class="texts">
<div class="wrapper">
sample text in this
</div>
<div class="wrapper">
sample text in this
</div>
<div class="wrapper">
sample text in this
</div>
<div class="wrapper">
sample text in this
</div>
<div class="wrapper">
<a href="#">TEST</a>
</div>
<div class="wrapper">
sample text in this
</div>
</div>
This is working. But when i inspect i can see that the style is being applied to the anchor tag element. I am converting all the styles applied to inline later. So the color that is striked while inspecting is taken as inline. Why does that happen. See the