Commit graph

9 commits

Author SHA1 Message Date
Raymond Hill
3a51ca0002
Add :style-based procedural operator 2020-09-05 09:58:54 -04:00
Raymond Hill
72bb700568
Add procedural cosmetic operators remove() and upward()
***

New procedural cosmetic operator: `:remove()`

Related issue:
- https://github.com/gorhill/uBlock/issues/2252

The purpose is to outright remove elements from the
DOM tree. Since `:remove()` is an "action" operator,
it must only be used as a trailing operator (just
like the `:style()` operator).

AdGuard's cosmetic filter syntax `{ remove: true; }`
will be converted to uBO's `:remove()` operator
internally.

***

New procedural cosmetic operator: `:upward(...)`

The purpose is to lookup an ancestor element.

When used with an integer argument, it is synonym of
`:nth-ancestor()`, which will be deprecated and which
will no longer be supported once no longer used in
mainstream filter lists.

Filter lists maintainers must only use `:upward(int)`
instead of `:nth-ancestor(int)` once the new operator
become available in all stable releases of uBO.

`:upward()` can also accept a CSS selector as argument,
in which case the nearest ancestor which matches the
CSS selector will be selected.
2020-03-07 14:25:06 -05:00
Raymond Hill
c1bdc123f2
Fix use of sibling-related CSS syntax at prefix position
Related discussion:
- https://www.reddit.com/r/uBlockOrigin/comments/c6iem5/
2019-06-29 14:07:54 -04:00
Raymond Hill
0f318e9505
Add unsupported cases to test pages
Related discussion:
- https://www.reddit.com/r/uBlockOrigin/comments/c6iem5/
2019-06-29 11:40:10 -04:00
Raymond Hill
4956a166d3
Make test pages small-screen friendly 2019-06-23 08:05:28 -04:00
Raymond Hill
a436102ff7
Add test case for :watch-attr 2019-06-22 16:41:42 -04:00
Raymond Hill
9def7f9c5d
Add tests for chaining with plain CSS syntax 2019-06-22 12:13:27 -04:00
Raymond Hill
b5397be601
Add link to parent page 2019-06-22 10:19:36 -04:00
Raymond Hill
10236552ca
Add test pages for procedural filters
Procedural cosmetic filters:
https://gorhill.github.io/uBlock/tests/procedural-cosmetic-filters.html

Procedural HTML filters:
https://gorhill.github.io/uBlock/tests/procedural-html-filters.html
2019-06-22 10:00:25 -04:00