Skip to content

[css-pseudo] text decorations on highlight pseudos (closes #6022) #6666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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