I am working on collapse-able tables. I am trying to change background for even tr
but I don't calculate hidden tr which have .hide class.
Issue: suppose I have two hidden tr
by applying
:nth-of-type(even) // even = 2
{
background: #F5F5F5;
}
changes background of every even tr
. This cause two visible tr
with same color. While I need stripped functionality. I don't want this selector apply on those hidden tr
with class .hide
. So that there would be no two adjustment tr
with same background. As shown in screen shot.
I have tried following but not successful.
tr:not(.hide)
{
&:nth-of-type(even)
{
background: #F5F5F5;
}
}