ABP Custom Filter - How to select/Hide Parent element

adblock, css

Solution

You can't do that, because of limitations of CSS 3.

It will be possible after implementation of the relational pseudo-class: :has() from Selectors Level 4, with following syntax:

example.com##div:has(> #abx)

Current support for this feature.

Problem

I want to know if there is a way to hide parent element of an identified element. for example: ``` <div> <span id="abx">some garbage content</span> <div>other garbage containers not having any class or id</div> </div> ``` The custom filter of AdBlockPlus to select `abx` will be: ``` ##span#abx ``` But how to select its parent element? because we need to hide all siblings of identified element.

Original source