Skip to content

Commit 82d77fc

Browse files
committed
[css-pseudo-4] Define painting of text-shadow for highlight pseudos. #3932
1 parent 16f9106 commit 82d77fc

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

css-pseudo-4/Overview.bs

+21-3
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,9 @@ Cascading and Per-Element Highlight Styles</h3>
670670
<h3 id="highlight-painting">
671671
Painting the Highlight</h3>
672672

673+
<h4 id="highlight-backgrounds">
674+
Backgrounds</h4>
675+
673676
Each <a>highlight pseudo-element</a> draws its background
674677
over the corresponding portion of the <a>highlight overlay</a>,
675678
painting it
@@ -685,6 +688,22 @@ Painting the Highlight</h3>
685688
css/css-pseudo/highlight-z-index-002.html
686689
</wpt>
687690

691+
<h4 id="highlight-shadows">
692+
Shadows</h4>
693+
694+
Any 'text-shadow' applying to a [=highlight pseudo-element=]
695+
is drawn over its corresponding [=highlight overlay=] background.
696+
Such text shadows also stack over each other
697+
(and over any original 'text-shadow' applied to the text and its decorations,
698+
which continues to apply).
699+
700+
Note: Since each [=highlight overlay=] background
701+
is drawn over any shadows belonging to the layer(s) below,
702+
a [=highlight overlay=] background can obscure lower-level shadows.
703+
704+
<h4 id="highlight-text">
705+
Text and Text Decorations</h4>
706+
688707
A <a>highlight pseudo-element</a>
689708
also suppresses the drawing of any selected text
690709
(and any text decorations applied to that text).
@@ -711,9 +730,8 @@ Painting the Highlight</h3>
711730
when that is not ''currentColor'',
712731
regardless of their original color or fill specifications.
713732

714-
Issue: What should happen with text shadows?
715-
Drawing them in their original color is disconcerting if that color is not a shade of gray.
716-
Maybe if the overlay has a background, suppress any text shadows below it?
733+
<h4 id="highlight-replaced">
734+
Replaced Elements</h4>
717735

718736
For non-replaced content, the UA must honor the 'color' and 'background-color'
719737
(including their alpha channels) as specified.

0 commit comments

Comments
 (0)