I have a problem where I can't decide how best to zebra stripe my tree with css.
The problem arises because when you click on a node in the tree, its children will become hidden, but still count towards the "odd vs even child" selectors. A possibility is to bypass that by writing selectors that count children & parents separately and start the children with the opposite color from its parent, but if you have an even number of children, the last one will be the same color as the next parent.
So, to make things a bit easier to understand:
[Parent - gray stripe]
[child - white]
[child - gray]
[Parent2 - white]
The problem comes where the parents alternate striping -- I want to avoid it so that the children and the parents that follows after it are not the same color stripe.
bottom line, this cannot be solved using css unless we physically add & remove rows, which will require us to change the implementation of the table we are using.
Does anybody know of a better way to solve this issue?