Intent to Implement :matches()
CSS Selectors 4 will be introducing the matches-any pseudo-class :matches().
The motivation for implementing :matches() is to eventually remove the need for the vendor-specific prefix to the :-webkit-any() selector, which is currently implemented in Chrome, and improve interoperability. Safari already implements :matches(), so implementing this in Chrome should further encourage Edge and Firefox to implement it also. Edge has not shipped any implementation of :matches() and Firefox, like Chrome, has a vendor-specific prefix to the selector (:-moz-any()).
macOS High Sierra
Interoperability and Compatibility
There should be low interoperability risk as Safari has already shipped this feature. Chrome also implements similar functionality through the selector :-webkit-any(), however without the capability of processing complex selectors as arguments. Firefox and Edge would then be further influenced to implement :matches().
The removal of :-webkit-any() will not occur during the implementation of :matches(). Use-counters will be added to both selectors to aid in the decision of removing :-webkit-any() in the future. :-webkit-any() has already been deprecated by Webkit.
There should be low compatibility risk when adding this feature as it has most of the required functionality implemented already by :-webkit-any() and only requires the additional implementation of complex selector lists.
Comparison between browsers and their implementations of some of these features can be found here.
It should not be challenging for developers to use this feature once it is implemented.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Feature dashboard link
Requesting approval to ship?
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/9879fad2-46e0-45c0-a359-2416cf085173%40chromium.org.