Extended CSS

Hide elements regular CSS selectors can't reach

What it does

Some elements are only identifiable by what they say or how they look at runtime — not by their HTML attributes. Extended CSS adds procedural selectors that can match those.

Sponsored — Why this brand…
Today's headline goes here
Container wrapping .ad child
Another article paragraph
Yellow promo callout
Match by text, by what an element contains, or by its computed style — when ordinary CSS isn't enough.

How it works

Extended CSS adds selectors like :has-text() to match by content, :has() to match by what an element contains, and :matches-css() to match by computed styles. Useful when an element has no stable class or ID. Example: hide any paragraph containing the word “sponsored.”

What you get

  • Match elements by their text content with :has-text()
  • Select parents by their children with :has()
  • Target by computed CSS with :matches-css()
  • Style instead of hide with :style()

Turn it on

Included in filter lists; add your own rules via Custom Filters using the extended-selector syntax.

Built on the Ghostery Adblocker engine

Ghostery's ad-blocking is powered by the open-source Ghostery Adblocker library — a fast, memory-efficient filter engine maintained in the open.

View Adblocker on GitHub

Get Ghostery. It's free.

Block ads and trackers in your browser. No account required. Open source and free.

Download Ghostery