Exposes find-in-page search result styling to authors as a highlight pseudo-element, like selection and spelling errors. This allows authors to change the foreground and background colors or add text decorations, which can be especially useful if the UA defaults have insufficient contrast with the page colors or are otherwise unsuitable.
The feature is in the CSS Pseudo spec and there are no open issues. The behavior is designed to be implementable in Firefox and Chrome, but is unlikely to be viable in Safari due to highly customize UI for find-in-page. The spec is explicit that browsers may choose not to implement this feature provided @supports information is correct. The Safari behavior is so different that developers are unlikely to believe their styling would apply there.
None.
There is no way to polyfill this. There is no real challenge to adopting beyond awareness that the feature exists, and we will be producing blog postings and other social media evangelization.
There is no security risk. The CSS styling is available regardless of whether the text is search for or not, so user find-in-page queries cannot be seen by script.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
No
There is no security risk. The CSS styling is available regardless of whether the text is search for or not, so user find-in-page queries cannot be seen by script.
All platforms support find-in-page and could use CSS styling to improve legibility on some sites.
Testing is in wpt_internal tests due to a lack of wpt support for adding find-in-page markers. third_party/blink/web_tests/wpt_internal/css/css-pseudo/search-text-*
Does the feature depend on any code or APIs outside the Chromium open source repository and its open-source dependencies to function?
NoShipping on desktop | 140 |
DevTrial on desktop | 135 |
---|---|
Shipping on Android | 140 |
DevTrial on Android | 135 |
Shipping on WebView | 140 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
NoneContact emails sche...@chromium.org , ji...@igalia.com
Explainer https://github.com/Igalia/explainers/blob/main/css/find-in-page/README.md
Specification https://drafts.csswg.org/css-pseudo-4/#selectordef-search-text
Design docs
https://github.com/Igalia/explainers/blob/main/css/find-in-page/README.md
SummaryExposes find-in-page search result styling to authors as a highlight pseudo-element, like selection and spelling errors. This allows authors to change the foreground and background colors or add text decorations, which can be especially useful if the UA defaults have insufficient contrast with the page colors or are otherwise unsuitable.
Blink component Blink>CSS
Search tags search
TAG review None
TAG review status Not applicable
On Thursday, July 10, 2025 at 4:41:12 AM UTC+9 Chromestatus wrote:Contact emails sche...@chromium.org , ji...@igalia.com
Explainer https://github.com/Igalia/explainers/blob/main/css/find-in-page/README.md
Specification https://drafts.csswg.org/css-pseudo-4/#selectordef-search-text
Design docs
https://github.com/Igalia/explainers/blob/main/css/find-in-page/README.md
SummaryExposes find-in-page search result styling to authors as a highlight pseudo-element, like selection and spelling errors. This allows authors to change the foreground and background colors or add text decorations, which can be especially useful if the UA defaults have insufficient contrast with the page colors or are otherwise unsuitable.
Blink component Blink>CSS
Search tags search
TAG review None
TAG review status Not applicable
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org .
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGsbWzRDTpo0grPCaqQkdUOacQQ0ovjr_mL-%3DpOmxYKqcyNYMw%40mail.gmail.com .
The API Owners discussed this today and had some concerns that the motivation is not as clear as it could be. We'd like to better understand the developer need for styling these highlights.
- Someone directly asks for CSS styling of find-in-page : the use case is "if a user use's their browser's find function to search through the table, the browser will highlight the matching text, but I want to be able to highlight the entire row if any of it's cells contain a match". But this proposal won't solve for this; it only allows for things like the color/background color to be changed, not the area that the highlight covers.
- Another direct question : it's not clear why the developer wants to do this.
- A user wants to hide find-in-page results : for this one the developer basically wants to disable find-on-page, which seems like something we don't want to be helping with since it makes things less accessible for users.
So these don't make a strong case to why this feature is the right answer.If the main developer concern being solved for is lack of contrast for find results against other page content, such as in https://github.com/w3c/csswg-drafts/issues/3812#issuecomment-1703272181 , then couldn't browsers be doing a better job of solving this problem by default rather than pushing the burden onto developers? For example, the case pointed out in that issue comment is not so bad in Safari because of Safari's greying-out of the rest of the page when Find is active.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/df61d4d1-f902-46ef-9e6d-ad349f7c556bn%40chromium.org .