#1120: CSS find-in-page highlight pseudos

Visit on Github.

Opened Jul 14, 2025

こんにちは TAG-さん!

I'm requesting a TAG review of the new highlight pseudo-element, ::search-text

This pseudo-element exposes find-in-page search result styling to authors, including selection and spelling errors. It allows authors to change the foreground and background colors or add text decorations, which can be especially useful if the UA defaults are insufficiently contrasted with the page colors or otherwise unsuitable.

Specification

https://drafts.csswg.org/css-pseudo-4/#selectordef-search-text

Explainer

https://github.com/Igalia/explainers/blob/main/css/find-in-page/README.md

Links

The specification

Where and by whom is the work is being done?

  • GitHub repo: https://github.com/Igalia/explainers/tree/main/css/find-in-page
  • Primary contacts:
    • Delan Azabani (@delan), Igalia
    • Jihye Hong (@jihyerish), Igalia
    • Stephen Chenney (@schenney-chromium), Igalia
  • Organization/project driving the specification: Igalia
  • This work is being funded by: Bloomberg and Igalia
  • Primary standards group developing this feature: CSSWG
  • Incubation and standards groups that have discussed the design:

Feedback so far

You should also know that...

No response

<!-- Content below this is maintained by @w3c-tag-bot -->

Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1120

Discussions

Log in to see TAG-private discussions.

Discussed Jul 28, 2025 (See Github)

Xiaocheng: Still reading Matt's comment in the brainstorming thread, which is one minute old. ... My concern here is that the design is very centric to the behaviour of Chrome and Firefox and it might not work on Safari. The proponents also said that they do not expect Safari to implement. I wonder what this means. No interoperability?

Martin+Lola: Not really acceptable.

Lola: Anything from Safari on this?

(Tess says that this is not possible.)

Lola: Negative?

Martin: Interop is voluntary, but no point if there is no hope of interoperability.

Marcos: Igalia is implementing on Blink. Interesting that they didn't see WebKit as a problem.

Christian: This is tough. The use case (sort of) makes sense. Interest from implementers. Not having interoperability is not great.

Lola: There are CSS highlight things going on elsewhere. Firefox did something in the recent release; Firefox exposes this to a11y, but Chrome doesn't. Interoperability for this stuff is already called into question. To have a major browser not be able to implement might make this worse than better.

Matthew: There have been discussions about the semantics of highlights. This case is separate to those. These do need to be exposed to a11y. Like to +1 to Christian about the use case and an opportunity to improve a11y. The proposal might not work, but it is nicely consistent with other highlighting APIs, so it would be nice if it was possible.

Lola: Can we ask that they work with Safari? So that we get interoperability. The other highlight isn't necessarily the same feature, but because this is highlights in general, I'm concerned about lack of adoption from developers, because brittle features won't be used. Also, I'm not won over, just because developers want this. Need to consider the impact on users being inconsistent or negative.

Martin: That's what we do.

Lola: I'm not in favour of saying satisfied for this reason.

Matthew: We all want the problem solved, but we know that solving the problem would mean no interoperable solution. The issue that I've linked from my comment talks about Safari. That might be because their colours are fixed. Possibly something to do with system colours might provide a way to smooth this out. Right now we can't say that it needs to happen this way.

Lola: Does that help, Xiaocheng?

Xiaocheng: Are we going to suggest that they investigate other alternatives that are interoperable? Something like "we acknowledge the value of the use case"... There are good parts of the proposal. The consistency with other highlight pseudo-classes. How many of us thinks we should raise this non-interop concern.

(Virtually unanimous concerns with interop.)

Xiaocheng: I'll draft a comment with two points: the use case is legit and we like the consistency with existing highlight patterns BUT we don't like that this isn't interoperable.

Martin: What about Safari and the other highlights? Because if that has shipped, an alternative design here might make it impossible to have consistency across those highlight types, which is unfortunate.

Comment by @matatk Aug 7, 2025 (See Github)

Hi @jihyerish, the TAG discussed it at a Breakout today, and found that:

  • The use case is strong, and the proposed feature solves it nicely while being consistent with the existing highlight pseudos
  • However, we are concerned that the feature is not implementable on Safari, and therefore, will break the interoperability of the Web

Have you explored alternatives that can mitigate the interoperability issue? A good starting point is https://www.w3.org/TR/design-principles/#implementability

Thank you!