@@ -894,16 +894,12 @@ Styling Highlights</h3>
894
894
<wpt>
895
895
textpath-selection-011.html
896
896
</wpt>
897
-
898
- <li> [=custom properties=] [[!CSS-VARIABLES-1]]
899
897
</ul>
900
898
901
- The 'forced-color-adjust' property cannot be set on [=highlight pseudo-elements=] ;
902
- however a [=highlight pseudo-element=] must honor
903
- any [=forced colors mode=] applied to its [=originating element=]
904
- (and is therefore subject to the control of the [=originating element=] ’s 'forced-color-adjust' value).
905
-
906
899
Issue: Are there any other properties that should be included here?
900
+
901
+ Note: Historically (and at the time of writing)
902
+ only 'color' and 'background-color' have been interoperably supported.
907
903
908
904
Note: The 'color' property sets the color of
909
905
both the text
@@ -912,6 +908,25 @@ Styling Highlights</h3>
912
908
applied to the text
913
909
by the <a>originating element</a> and its ancestors and descendants.
914
910
911
+ <h4>Values Resolved From Originating Elements</h4>
912
+ There are several properties that modify colors or resolve units but cannot be
913
+ used inside [=highlight pseudo-elements=] , yet are important for specifyng the
914
+ appearance of properties that are used in the highlight. For example:
915
+
916
+ <ul>
917
+ <li> 'forced-color-adjust' (used with [=forced colors mode=] , which [=highlight pseudo-elements=] must respect)
918
+ <li> 'font' , 'font-size' , etc. used to resolve 'em' and other font-relative units.
919
+ <li> 'line-height' used to resolve 'lh' units.
920
+ <li> [=custom properties=] [[!CSS-VARIABLES-1]] used as property values.
921
+ </ul>
922
+
923
+ These properties are ignored if defined on the [=highlight pseudo-element=]
924
+ itself. Rather, any non-allowed property required to define the appearance of a
925
+ [=highlight pseudo-element=] is taken from the [=originating element=] ’s
926
+ corresponding property. The computed style of the [=highlight pseudo-element=]
927
+ will include any properties taken from the originating element, even if not
928
+ allowed on the [=highlight pseudo-element=] itself.
929
+
915
930
<!-- Add this back if for some reason someone wants to implement 'outline' ?
916
931
The outline, if supported, must be drawn
917
932
around the union of the active portions of the <a>highlight overlay</a>
@@ -923,8 +938,6 @@ Styling Highlights</h3>
923
938
into a single shape.
924
939
-->
925
940
926
- Note: Historically (and at the time of writing)
927
- only 'color' and 'background-color' have been interoperably supported.
928
941
929
942
<h3 id=highlight-ua-styles>
930
943
Default UA Styles</h3>
0 commit comments