Skip to content

Need help with creating a filter #17526

Answered by gorhill
partingscientist asked this question in Q&A
Discussion options

You must be logged in to vote

This should cause less overhead on browsers supporting native CSS:has():

##[data-testid="divProductWrapper"]:not(:has(.prd_label-integrity)):upward(2)

Everything up to :upward is looked up using native CSS, and the final procedural :upward applies only to the 15 or so elements matching. I don't think it can be better than this, unless you accept to make the whole filter CSS native using:

##.css-12sieg3:not(:has(.prd_label-integrity))

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@partingscientist
Comment options

@gorhill
Comment options

@gorhill
Comment options

Answer selected by partingscientist
@partingscientist
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants