Skip to content

Commit

Permalink
[css-pseudo] text decorations on highlight pseudos (closes #6022) (#6666
Browse files Browse the repository at this point in the history
)

Clarify highlight decoration semantics
  • Loading branch information
delan authored Jan 31, 2022
1 parent 7e2db57 commit 1b149ad
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions css-pseudo-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -917,15 +917,22 @@ Shadows</h4>
Text and Text Decorations</h4>

A <a>highlight pseudo-element</a>
suppresses the normal drawing of any associated text
(and the text decorations that had been applied to that text).
suppresses the normal drawing of any associated text,
and the text decorations
(other than shadows)
that had been applied to that text.
Instead the topmost active <a>highlight overlay</a>
redraws that text
(and those decorations)
over all the <a>highlight overlay</a> backgrounds
<!-- (and outlines, if any) -->
using that highlight’s own 'color'.

Note: This means that unlike shadows,
line decorations and emphasis marks
won’t be obscured by any highlight overlay backgrounds
that are drawn for the associated text.

For this purpose,
''currentColor'' on a [=highlight pseudo-element=]’s 'color' property represents
the 'color' of the next <a>highlight pseudo-element</a> layer below,
Expand Down Expand Up @@ -959,7 +966,7 @@ Text and Text Decorations</h4>
<div class="example">
For example, assuming the original text has an underline and a strike-through,
that ''::selection'' applies an underline
and ''::target-text'' appplies both overline and strike-through,
and ''::target-text'' applies both overline and strike-through,
the following are both conformant painting orders:
<div style="columns: 20em">
<ol style="break-inside: avoid; margin-top: 0;">
Expand Down

0 comments on commit 1b149ad

Please sign in to comment.