I have a DOM tree which looks something like this (formulated as a regex):
div.container (div.notbox | div.box)+
Now I need so select all "first-level" .box children. Lets assume following document:
<div class="container">
<div>
<div class="box" id="1">
<div class="box" id="2"></div>
</div>
</div>
<div class="box" id="3"></div>
</div>
In this case I would need to select #1 and #3, but not #2. Is there a way to formulate that with a CSS query? Something like
.container > :not(.box) > .box
but repeat the :not(.box) clause an indefinite amount of times?