Hello,
It should be nice if :nth-child can take care about :not() (and/or other) selector.
I work on embedded system and when a "table" is displayed it better to filter element only on client side with some display:block/none instead of redraw the full "table" with or without request to the backend.
Today if we want to color odd lines in blue and even lines in green, it's works when the full table is displayed but not when we filtered and hidden some line.
https://codepen.io/Ygles/pen/aboYLQE
Today more embedded system used WEB technology for MMI but the network or the system is not as powerfull as standard computer.
Regards
Nicolas PILLON
There is the of S syntax for this: :nth-child(even of :not(.hidden)).
https://drafts.csswg.org/selectors-4/#the-nth-child-pseudo
But is seems it's only supported by Safari right now.
Thanks do you know if the support is on the others browser roadmap ?
Yes. In Blink, of S will likely follow after :where and :is.
Tkanks
Most helpful comment
There is the
of Ssyntax for this::nth-child(even of :not(.hidden)).https://drafts.csswg.org/selectors-4/#the-nth-child-pseudo
But is seems it's only supported by Safari right now.