Skip to content

Commit

Permalink
[css-pseudo-4] Add new pseudo-element ::search-text #10212 #10213
Browse files Browse the repository at this point in the history
See #10475

Co-authored-by: Jihye Hong <jihye@igalia.com>
  • Loading branch information
fantasai and jihyerish committed Oct 15, 2024
1 parent a1ebde1 commit a32f4f1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion css-pseudo-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ Styling the First-Letter Pseudo-elements</h4>
Highlight Pseudo-elements</h2>

<h3 id="highlight-selectors">
Selecting Highlighted Content: the ''::selection'', ''::target-text'', ''::spelling-error'', ''::grammar-error'', and ''::highlight()'' pseudo-elements</h3>
Selecting Highlighted Content: the ''::selection'', ''::search-text'', ''::target-text'', ''::spelling-error'', ''::grammar-error'', and ''::highlight()'' pseudo-elements</h3>

<wpt>
grammar-spelling-errors-001.html
Expand Down Expand Up @@ -738,6 +738,16 @@ Selecting Highlighted Content: the ''::selection'', ''::target-text'', ''::spel
textpath-selection-011.html
</wpt>

<dt><dfn>::search-text</dfn>
<dd>
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?

<dt><dfn>::target-text</dfn>
<dd>
The ''::target-text'' pseudo-element represents text
Expand Down Expand Up @@ -1210,6 +1220,9 @@ Backgrounds</h4>
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.

<wpt>
selection-overlay-and-grammar-001.html
Expand Down

0 comments on commit a32f4f1

Please sign in to comment.