有原生的 CSS 替代 :has-text() 吗?

Is there a native CSS replacement for :has-text()?

我看到 MDN Web 文档现在列出了来自 uBlock Origin 的 :has() pseudo-class among others, but is there something similar to :has-text()

span:has-text(Promoted by) {
  display: none;
}

uBlock Origin 两者都有,所以我想知道我是否只是忽略了 MDN 上的某些内容。

除非我错了,这在 CSS 中是不可能的。

“最简单的替代方法”是使用 xpath,但它在 CSS 中不再可用:

//a[contains(text(),"Promoted by")]
//a[text()="Promoted by"] (exact match)