Hacker News new | past | comments | ask | show | jobs | submit login

You can make nth-child repeat by using an arithmetic expression inside the parentheses, like nth-child(3n). They also stack, so you can create pseudorandom transformations to a sequence of elements by adding styles for the first few prime numbers.



Or nth-child(even), or nth-child(odd). (Keeping in mind that children are 1-indexed in CSS.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: