nth-child question

The question is it possible to make nth-child to count only elements with some class name?
Now seems that the current algorithm is to gather pseudo-classes first...

This can be very usefull when you want to show and hide dynamically groups of rows in a table and want to keep proper "zebra styling" of rows.

tbody tr:not([class]):nth-child(even)

Table 1
(no hidden rows)
Data 1 Data 2 Data 3 Data 4
123 234 1 345
48537 32748 2 38427
832478 8743 3 43728
4782 834 4 84327
84273 8472 5 2381
428 48 6 999
0834 786432 7 7643
762 7698 8 87624
84327 43271 9 3812
436543 43554 10 2938
1983 39428 11 9328
Table 2
(some rows has hidden class)
Data 1 Data 2 Data 3 Data 4
123 234 1 345
48537 32748 2 38427
428 48 6 999
0834 786432 7 7643
762 7698 8 87624
84327 43271 9 3812
1983 39428 11 9328
Table 3
(some rows has invisible class)
Data 1 Data 2 Data 3 Data 4
123 234 1 345
48537 32748 2 38427
428 48 6 999
0834 786432 7 7643
762 7698 8 87624
84327 43271 9 3812
1983 39428 11 9328
Table 4
(how I want it looks)
Data 1 Data 2 Data 3 Data 4
123 234 1 345
48537 32748 2 38427
428 48 6 999
0834 786432 7 7643
762 7698 8 87624
84327 43271 9 3812
1983 39428 11 9328

tbody tr[class]:nth-child(even)

Table 5
Data 1 Data 2 Data 3 Data 4
123 234 1 345
48537 32748 2 38427
832478 8743 3 43728
4782 834 4 84327
84273 8472 5 2381
428 48 6 999
0834 786432 7 7643
762 7698 8 87624
84327 43271 9 3812
436543 43554 10 2938
1983 39428 11 9328

tbody tr.zebra:nth-child(even)

Table 6
Data 1 Data 2 Data 3 Data 4
123 234 1 345
48537 32748 2 38427
428 48 6 999
0834 786432 7 7643
762 7698 8 87624
84327 43271 9 3812
1983 39428 11 9328

tbody tr.zebra:nth-of-type(even)

Table 7
Data 1 Data 2 Data 3 Data 4
123 234 1 345
48537 32748 2 38427
428 48 6 999
0834 786432 7 7643
762 7698 8 87624
84327 43271 9 3812
1983 39428 11 9328