Unfortunately, for you, the counter n is local to nth-of-type , where it is defined, so your method will not work. You would need to do something like this:
label:checked:nth-of-type(1) ~ article:nth-of-type(1), label:checked:nth-of-type(2) ~ article:nth-of-type(2), label:checked:nth-of-type(3) ~ article:nth-of-type(3), label:checked:nth-of-type(4) ~ article:nth-of-type(4), label:checked:nth-of-type(5) ~ article:nth-of-type(5), ... { }
... it is a pain. I see where you are going with him, and it would be great to use something like that!
source share