Multiple descendant children selector with css [duplicate]

There are actually elements which are not .bbb – the two divs before and after .bbb in this case. For this to work, you’ll need to be more specific. You can add another class (zzz in the example), and if this class is not combined with .bbb the rule will be applied.

.aaa .zzz:not(.bbb) .ccc {
  font-size: 20px;
  color: #FF0000;
}
<div class="aaa">
  <div>
    <div>
      <div class="zzz bbb">
        <div>
          <div>
            <div class="ccc">AQUI</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Leave a Comment