I looked at other Q & As, but did not find this specific example. (Please point me if I missed this)
I have no control over HTML that looks like this:
<table> <tbody> <tr class="group open"><td>stuff</td></tr> <tr class="child"><td>stuff</td></tr> <tr class="child"><td>stuff</td></tr> ditto <tr class="group"><td>stuff</td></tr> //Style this one only <tr class="group"><td>stuff</td></tr> //etc. </tbody> </table>
(Yes, the name ".child" is not very accurate here, not my code.)
Is it possible to create the first next brother of tr.group, which is not tr.child? There can be any number of tr.child elements after tr.open.
I tried this without success:
div.mystuff table tr.group.open + tr:not(.child)
The only thing I can add is that the tr.child elements are set to display: none at boot time. But this should not affect the display on the screen: block.
source share