Closed as fixed:
New cosmetic filtering operators:
This is a planned CSS4 operator, but no browser supports it yet. I decided to go ahead and implement it so that it can already be used. See The Relational Pseudo-class: :has() in the Selector Level 4/Editor's Draft.
uBO's implementation is simplified so as to ensure performance. The :has operator must be used with at least one hostname (it must be specific), and must be of the form (example):
In this example, yandex.ru is the hostname. The part preceding :has(...) -- .serp-item above -- is the DOM node which will be targeted (i.e. hidden by uBO), and must be a valid CSS expression. The part inside the :has parentheses -- .label_color_yellow above -- must be a valid CSS expression, and is the condition that must be fulfilled -- i.e. in the above example, nodes which have a class serp-item will be hidden if and only if they have a descendant with class label_color_yellow.
This new cosmetic filter operator is to support and leverage the power of XPaths. The :xpath() operator must always be used in a specific cosmetic filter, i.e. they must apply to at least one hostname or entity. An example of how to use it:
These new operators are to be used only for cosmetic filtering cases which are hard to crack -- more and more of these are surfacing (for example DOM elements with random class or id values).
When it comes to cosmetic filtering, preferably, always favor a plain old CSS3-based cosmetic filter, since they can be used in a declarative way, inside a style tag. But there are cases where no CSS3-based expression will work, and in such case consider these new :has and :xpath operators.
These new cosmetic filtering operators can be "excepted" like any other standard CSS3-based cosmetic filter using the usual #@# prompt. Such exception cosmetic filters do not have to be specific however, i.e. you do not have to associate them to a specific hostname/entity.
Related issue: Support cosmetic filters with explicit style properties.
By default, the implicit purpose of cosmetic filters is to hide unwanted DOM elements. However sometimes it may be useful to re-style a specific DOM element on a page rather than hide it. Here is an recent example of such cases. This is the purpose of the new :style-based selector. The syntax is as follow:
example.com##h1:style(background-color: blue !important)
So mainly it's exactly the same syntax of plain cosmetic filters, except that the :style(...) suffix is appended at the end. The content in the parentheses must be one or more CSS property declarations (separated by the standard ;).
As with the other new cosmetic filtering selectors, the :style can be used only for specific cosmetic filters, i.e. there must be a hostname of entity specified for the filter.
Adguard already support such feature, although using a different syntax. However uBO is able to transparently convert and make use of the Adguard's "CSS injection rules" if ever you use an Adguard filter list in uBO (well, this essentially means you can use Adguard's syntax in uBO if you prefer).
uMatrix's fix to issue #540 has been imported into uBO.
Fixed a static filtering issue reported in EasyList forum.
Separator ^ is being stripped off filters