From a32f4f1387205b2dc512073ca5c51328530ee18b Mon Sep 17 00:00:00 2001 From: fantasai Date: Tue, 15 Oct 2024 00:27:02 -0400 Subject: [PATCH] [css-pseudo-4] Add new pseudo-element ::search-text #10212 #10213 See https://github.com/w3c/csswg-drafts/pull/10475 Co-authored-by: Jihye Hong --- css-pseudo-4/Overview.bs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/css-pseudo-4/Overview.bs b/css-pseudo-4/Overview.bs index 108fa0e33d8..3fcac23435b 100644 --- a/css-pseudo-4/Overview.bs +++ b/css-pseudo-4/Overview.bs @@ -640,7 +640,7 @@ Styling the First-Letter Pseudo-elements Highlight Pseudo-elements

-Selecting Highlighted Content: the ''::selection'', ''::target-text'', ''::spelling-error'', ''::grammar-error'', and ''::highlight()'' pseudo-elements

+Selecting Highlighted Content: the ''::selection'', ''::search-text'', ''::target-text'', ''::spelling-error'', ''::grammar-error'', and ''::highlight()'' pseudo-elements grammar-spelling-errors-001.html @@ -738,6 +738,16 @@ Selecting Highlighted Content: the ''::selection'', ''::target-text'', ''::spel textpath-selection-011.html +
::search-text +
+ The ''::search-text'' pseudo-element represents text + identified by the user agent’s find-in-page feature. + Since not all UAs style matched text in ways + expressible with the [=highlight pseudo-elements=], + this pseudo-element is optional to implement. + + Issue(10527): How to identify the current match? +
::target-text
The ''::target-text'' pseudo-element represents text @@ -1210,6 +1220,9 @@ Backgrounds over the ''::spelling-error'' overlay which is drawn over the ''::grammar-error'' overlay which is drawn over the ''::highlight'' overlays. + The ''::search-text'' overlay is drawn directly over or below + the '':selection'' overlay depending on the UA, + and drawn over all other overlays. selection-overlay-and-grammar-001.html