Here is the html layout
<div class="wrap">
<div class="section">
<span class="text">text1</span>
</div>
<span class="text">text2</span>
<span class="not-text">don't color me!</span>
</div>
Im trying to give a style to all "text" spans which are not in the "section" divs. I tried this, but it doesn't seem to be working
.wrap :not(.section) .text
Any help is greatly appreciated!
Edit: There are several workarounds for this case including the use of > operator like in ".wrap > .text", but I would like to know how to make the :not selector working, to make use of it in the future