Back in 2015 when Safari Content Blockers were released it was said that they support CSS Selectors Level 4 expressions.
However even today they don't support at least the :has() operator.
What parts of Level4-only specification does Safari actually supports?
Is this the only what is supported (per Webkit blog post):
:matches(), :not(), :nth-child(), and :nth-last-child()?
Safari 9, released in 2015, shipped with support for the following level 4 selectors:
[type="text" i]:any-link:lang():not():matches():nth-child(An+B of S)(implied likewise for:nth-last-child()):placeholder-shownAs of 2018, no new level 4 selectors have been added since. However, Safari remains the only browser to support all but the first and last of these.
There are no known browser implementations of
:has(), and frankly I wouldn't hold out on one surfacing within the next few years. Given that browser implementations are optimized for matching CSS selectors live, implementing snapshot matching is going to take a non-trivial amount of work which doesn't seem to be work vendors want to invest effort into right now. The WG is still exploring their options in the performance department.