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
61 stars 9 forks source link

Next-sibling combinator matches too much #180

Open Alex-302 opened 6 months ago

Alex-302 commented 6 months ago

Example link: https://forum.ru-board.com/forum.cgi?forum=active15 Rule: forum.ru-board.com#?#body > table[align="center"]:contains(Сортировать ) + * + *

Expected behavior:

The rule must hide еру last element, marked on the screenshot

Details ![image](https://github.com/AdguardTeam/ExtendedCss/assets/8361299/80a1b779-2f06-4b56-8e20-aebface717b0)

Actual behavior

The rule hides 2 elements, next to element, matched by body > table[align="center"]:contains(Сортировать )

Details ![image](https://github.com/AdguardTeam/ExtendedCss/assets/8361299/742c6be9-baaa-4dd7-b7ab-f7599a8f7968)