AdguardTeam / ExtendedCss

A TypeScript library for non-standard element selecting — :contains(), :matches-css(), etc., and applying CSS styles with extended properties.
GNU General Public License v3.0
65 stars 9 forks source link

Remove ':if()' and ':if-not()' pseudo-classes #151

Closed zloyden closed 1 year ago

zloyden commented 1 year ago

I suppose, and according to the discussion https://github.com/uBlockOrigin/uBlock-issues/issues/2376, it is time to remove this pseudo-class https://github.com/AdguardTeam/ExtendedCss/#extended-css-if-not.

krystian3w commented 1 year ago

P.S. Removed form support in uBo also is :if(...): ##.TimelineItem:if(#issue-1459586391). I don't detected use in AG filters added to uBo Dashboard.

CSSTree also need update parser to longer use [-ext-has='...'] - or convert by script into uBo file (if recover support will by still rejected).

slavaleleka commented 1 year ago

@krystian3w you mean that :if() pseudo-class is no longer supported by uBo?

krystian3w commented 1 year ago

Yes, rules no match elements, same for [-ext-has] syntax.

Two may need rewrite no logner allowed charcters in :contains() aka https://github.com/AdguardTeam/FiltersCompiler/issues/156:

image

image

I think :if( ) don't back due no exist in approved AdGuard Filters* in uBo Dashboard. Also removed from wiki: https://github.com/gorhill/uBlock/wiki/Procedural-cosmetic-filters/_compare/83d971fd5915a1d9490e69574b60664c79486a00...2c704d06b896e92511cf8014d89582c8c1dbc3c4

* - rejected is:

  • Germany version by okiehsch - added few missed domains and maybe still watch changes,
  • Dutch version after select "EasyDutch" by Netherland Brothers (in uBo Dashboard).

    removed is: Russian version after ameshkov recommendation to use "RU AD List"

[-ext-has] It probably backfired into rewrite parser (I counted ≈1000 uses in approved lists, Maybe this will make a reply from Gorhill in a few days).