diff --git a/css-pseudo-4/Overview.bs b/css-pseudo-4/Overview.bs index 0c09488067a3..643e625822e3 100644 --- a/css-pseudo-4/Overview.bs +++ b/css-pseudo-4/Overview.bs @@ -910,6 +910,8 @@ Styling Highlights textpath-selection-011.html + +
  • [=custom properties=] [[!CSS-VARIABLES-1]] Issue: Are there any other properties that should be included here? @@ -1106,15 +1108,14 @@ Cascading and Per-Element Highlight Styles its [=specified value=] is determined by inheritance from the corresponding highlight pseudo-element of its originating element's parent element. - This occurs regardless of whether that property is an inherited property - (and regardless of whether that property is a [=custom property=] - that is registered to [=CSS/inherit=] or not). + This occurs regardless of whether that property is an inherited property. - Additionally, for [=highlight pseudo-elements=] originating from the [=root element=]: - + Additionally, for [=highlight pseudo-elements=] originating from the [=root element=] + the inherited value of 'color' is ''currentColor'', not the [=initial value=]. + + All [=custom properties=] inherit from the originating element, + regardless of whether that property is a [=custom property=] + that is registered to [=CSS/inherit=] or not. active-selection-051.html @@ -1201,18 +1202,21 @@ Cascading and Per-Element Highlight Styles text-decoration-color: var(--decoration-color, red); } - A div's selection highlight would be a green background to the - selected content, with a 1px thick blue underline. The - ''--background-color'' custom property is not found on the - ''div::selection'' nor ''::selection'' so it is taken from the - ''::root'' custom property match. The ''--decoration-thickness'' - property is inherited from ''::selection'' via the highlight - cascade and ''--decoration-color'' is found in - ''div::selection'' itself. + The universal ''::selection'' uses the user-agent's default styling + because it only defines custom properties, + with no properties that influence the appearance. + A div's selection highlight would apply a green background to the selected content, + with a 10px thick blue underline. + Since ''--background-color'' and ''--decoration-thickness'' custom properties + are not specified on the ''div::selection'' peudo-element, + they are inherited from its originating <{div}> element, + which itself inherits the custom properties from the root. + However since ''--decoration-color'' is specified on the ''div::selection'' itself, + its value from the [=originating element=] is not used. - Note: This behavior is intended to accomodate the standard practice of - defining document-wide custom properties on '':root''. + Note: This behavior allows control of selection with custom properties + in a way that is compatible with pre-existing implementations.

    Painting the Highlight

    @@ -1909,7 +1913,8 @@ Changes application and inheritance model for [=highlight pseudo-elements=] (Issues 7591, 7580, - 6641) + 6641, + 11317)
  • Defined ''::highlight()'' and improved cross-referencing to [[CSS-HIGHLIGHT-API-1]]. (Issue 6755)
  • Added ''::search-text'' as a new [=highlight pseudo-element=].