Skip to content

Commit f15d687

Browse files
dandclarkfantasai
andauthored
[css-pseudo-4] [css-highlight-api-1] Integrate custom highlights into css-pseudo-4 #6755
Co-authored-by: fantasai <fantasai.bugs@inkedblade.net>
1 parent 56e1d94 commit f15d687

File tree

2 files changed

+49
-6
lines changed

2 files changed

+49
-6
lines changed

css-highlight-api-1/Overview.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Setting up Custom Highlights</h2>
141141
<h3 id=creation>
142142
Creating Custom Highlights</h3>
143143

144-
A <dfn>custom highlight</dfn> is a collection of [=ranges=]
144+
A <dfn export>custom highlight</dfn> is a collection of [=ranges=]
145145
representing portions of a document.
146146
They do not necessarily fit into the element tree,
147147
and can arbitrarily cross element boundaries without honoring its nesting structure.

css-pseudo-4/Overview.bs

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ Styling the First-Letter Pseudo-elements</h4>
640640
Highlight Pseudo-elements</h2>
641641

642642
<h3 id="highlight-selectors">
643-
Selecting Highlighted Content: the ''::selection'', ''::target-text'', ''::spelling-error'', and ''::grammar-error'' pseudo-elements</h3>
643+
Selecting Highlighted Content: the ''::selection'', ''::target-text'', ''::spelling-error'', ''::grammar-error'', and ''::highlight'' pseudo-elements</h3>
644644

645645
<wpt>
646646
grammar-spelling-errors-001.html
@@ -792,15 +792,57 @@ Selecting Highlighted Content: the ''::selection'', ''::target-text'', ''::spel
792792
grammar-error-002-manual.html
793793
grammar-error-003-manual.html
794794
</wpt>
795+
796+
<dt><dfn>::highlight()</dfn>
797+
<dd>
798+
The ''::highlight()'' [=functional pseudo-element=] represents content associated with [=custom highlights=].
799+
Each [=custom highlight name=] represents a different type of highlight.
800+
See [[CSS-HIGHLIGHT-API-1]] for details.
801+
<wpt>
802+
css/css-highlight-api/painting/custom-highlight-painting-001.html
803+
css/css-highlight-api/painting/custom-highlight-painting-002.html
804+
css/css-highlight-api/painting/custom-highlight-painting-003.html
805+
css/css-highlight-api/painting/custom-highlight-painting-004.html
806+
css/css-highlight-api/painting/custom-highlight-painting-005.html
807+
css/css-highlight-api/painting/custom-highlight-painting-006.html
808+
css/css-highlight-api/painting/custom-highlight-painting-007.html
809+
css/css-highlight-api/painting/custom-highlight-painting-008.html
810+
css/css-highlight-api/painting/custom-highlight-painting-009.html
811+
css/css-highlight-api/painting/custom-highlight-painting-010.html
812+
css/css-highlight-api/painting/custom-highlight-painting-011.html
813+
css/css-highlight-api/painting/custom-highlight-painting-012.html
814+
css/css-highlight-api/painting/custom-highlight-painting-013.html
815+
css/css-highlight-api/painting/custom-highlight-painting-014.html
816+
css/css-highlight-api/painting/custom-highlight-painting-015.html
817+
css/css-highlight-api/painting/custom-highlight-painting-iframe-001.html
818+
css/css-highlight-api/painting/custom-highlight-painting-iframe-002.html
819+
css/css-highlight-api/painting/custom-highlight-painting-iframe-003.html
820+
css/css-highlight-api/painting/custom-highlight-painting-iframe-004.html
821+
css/css-highlight-api/painting/custom-highlight-painting-iframe-005.html
822+
css/css-highlight-api/painting/custom-highlight-painting-iframe-006.html
823+
css/css-highlight-api/painting/custom-highlight-painting-invalidation-001.html
824+
css/css-highlight-api/painting/custom-highlight-painting-invalidation-002.html
825+
css/css-highlight-api/painting/custom-highlight-painting-invalidation-003.html
826+
css/css-highlight-api/painting/custom-highlight-painting-invalidation-004.html
827+
css/css-highlight-api/painting/custom-highlight-painting-invalidation-005.html
828+
css/css-highlight-api/painting/custom-highlight-painting-invalidation-006.html
829+
css/css-highlight-api/painting/custom-highlight-painting-invalidation-007.html
830+
css/css-highlight-api/painting/custom-highlight-painting-prioritization-001.html
831+
css/css-highlight-api/painting/custom-highlight-painting-prioritization-002.html
832+
css/css-highlight-api/painting/custom-highlight-painting-staticrange-001.html
833+
css/css-highlight-api/painting/custom-highlight-painting-staticrange-002.html
834+
css/css-highlight-api/painting/custom-highlight-painting-staticrange-003.html
835+
css/css-highlight-api/painting/custom-highlight-painting-staticrange-004.html
836+
css/css-highlight-api/painting/custom-highlight-painting-staticrange-005.html
837+
css/css-highlight-api/painting/custom-highlight-painting-staticrange-006.html
838+
css/css-highlight-api/painting/custom-highlight-painting-staticrange-007.html
839+
</wpt>
795840
</dl>
796841

797842
The <a>highlight pseudo-elements</a>
798843
do not necessarily fit into the element tree,
799844
and can arbitrarily cross element boundaries without honoring its nesting structure.
800845

801-
Note: A future level of CSS may introduce ways to create
802-
custom highlight pseudo-elements.
803-
804846
<h3 id="highlight-styling">
805847
Styling Highlights</h3>
806848

@@ -1154,7 +1196,8 @@ Backgrounds</h4>
11541196
The ''::selection'' overlay is drawn
11551197
over the ''::target-text'' overlay which is drawn
11561198
over the ''::spelling-error'' overlay
1157-
which is drawn over the ''::grammar-error'' overlay.
1199+
which is drawn over the ''::grammar-error'' overlay
1200+
which is drawn over the ''::highlight'' overlays.
11581201

11591202
<wpt>
11601203
selection-overlay-and-grammar-001.html

0 commit comments

Comments
 (0)