This is a test of the CSS Level 4 :matches
pseudoclass, which seems to be implemented in current browsers as -moz-any
, -webkit-any
, and -blink-any
. It works in my current versions of Firefox, Chrome and Safari. The equivalent code for Opera and IE doesn’t seem to work at the moment, but if you know of a way to get them to work please leave a comment here.
If it is working in your browser the link text will appear green (whether visited or unvisited) and have a yellow background when it is hovered over, receives focus or is in the process of being clicked on.
See the Pen :matches pseudoclass by WebDevCA (@WebDevCA) on CodePen.