Note that you must hover over the ordered list to reveal its fullness. (Yes, I’m sorry if you’re on a mobie device. This is a simple testcase.)
The :nth-of-type()
portion refers only to that element type within the document structure; in this case, li
. It does not take the class negation into account when counting. Thus only the odd-numbered li
elements (within the set of elements of that type) can be selected, regardless of whether they are displayed or not. Structural selectors care about document structure, not rendering. Otherwise, list items 6, 8, 10, and 12 (in the hovered state; 5, 7, 9, and 11 unhovered) would be red-on-silver.
Furthermore, only those odd-numbered li
elements without a class
containing skip
are selected. Thus, the “skipped” list items do not get red italic text or silver backgrounds, even when they are odd-numbered members of the li
type set.