Selecting with ::nth-last-pseudo

The ::nth-last-pseudo selector matches from the end of the matched pseudo-elements list. It can match pseudo-elements by a specific index (not ordinal), odd, even or an+b formula (e.g.: 2n+1).

The demo works correctly if both the 'control' and 'pseudo-elements' sections look exactly the same. Take a look at the source code.

Control

123 - ABC

Pseudo-elements

-