Christian Ziebarth

Archive for November 2014

Test of the CSS :matches pseudo­class

In Uncategorized on November 13, 2014 at 11:31 pm

This is a test of the CSS Level 4 :matches pseudo­class, 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 pseudo­class by WebDevCA (@WebDevCA) on CodePen.