Day 108: the of S syntax in :nth-child()

from blog Manuel Matuzović - Blog, | ↗ original
↗ original
You can use the of S syntax in the :nth-child() pseudo-class to filter elements before the arguments in :nth-child() apply.The S in of S stands for a forgiving selector list. /* :nth-child(An+B [of S]?) */ tr:nth-child(even of .visible, .active) { } Let's say you have six list items and want to highlight every second item, but two of them are...