Re: [w3ctag/design-reviews] CSS find-in-page highlight pseudos (Issue #1120)

schenney-chromium left a comment (w3ctag/design-reviews#1120)

> Regarding the `:has(::search-text)` question, this will only tell you whether the style would apply _if_ the text is highlighted. It doesn't tell you whether that style is active of not. This is the same as `getComputedStyle`, which will return the style that would apply but not whether that style is active. The behavior is designed to protect user privacy and matches that for `spelling-error` and `::grammar-error` that have similar concerns.

I was wrong about this. Pseudo-element selectors are not allowed in `:has` so  `:has(::search-text)` will never match.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/1120#issuecomment-3897912357
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/1120/3897912357@github.com>

Received on Friday, 13 February 2026 15:47:25 UTC