Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for CSS Selectors 4 Pseudo-Class :nth-child(an + b of S) #278

Open
ghost opened this issue Mar 3, 2023 · 1 comment
Open

Support for CSS Selectors 4 Pseudo-Class :nth-child(an + b of S) #278

ghost opened this issue Mar 3, 2023 · 1 comment
Assignees
Labels
uBO-parity pending features that are already available in uBO

Comments

@ghost
Copy link

ghost commented Mar 3, 2023

Shipped in Chromium 111 https://chromestatus.com/feature/5144225077788672 it extends :nth-child() and :nth-last-child() pseudo classes to take a selector.

Examples:
:nth-child(-n+3 of li.important)
tr:nth-child(even of :not([hidden]))

@antonok-edm
Copy link
Collaborator

antonok-edm commented Mar 3, 2023

@Emi-TheDhamphirInLoveUnderTheFrozenStar thanks for reporting! This is actually handled just fine by adblock-rust. Instead it looks like there's just some issue in Brave where the selectors aren't working at all (even in a normal stylesheet). I suspect it's been enabled in Chrome 111 via an origin trial. I'll move this issue to brave-browser and see if we can investigate further there.

Nope, I misunderstood how it's supposed to work and on closer inspection, it is definitely not supported in adblock-rust with the css-validation feature enabled. Looks like the selectors library would have to be updated to support it.

@antonok-edm antonok-edm transferred this issue from brave/adblock-rust Mar 3, 2023
@antonok-edm antonok-edm self-assigned this Mar 3, 2023
@antonok-edm antonok-edm transferred this issue from brave/brave-browser Mar 3, 2023
@antonok-edm antonok-edm added the uBO-parity pending features that are already available in uBO label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
uBO-parity pending features that are already available in uBO
Projects
None yet
Development

No branches or pull requests

1 participant