You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: Because <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-emphasis-color">text-emphasis-color</a> defaults to <spanclass="css">currrentColor</span>,
521
521
it will by default also set the color of the the emphasis marks.</p>
522
522
<h3class="heading settled" data-level="3.3" id="highlight-bounds"><spanclass="secno">3.3. </span><spanclass="content"> Area of a Highlight</span><aclass="self-link" href="#highlight-bounds"></a></h3>
523
-
<p>For each instance of highlighting
524
-
there exists a <dfndata-dfn-type="dfn" data-noexport="" id="root-highlight-overlay">root highlight overlay<aclass="self-link" href="#root-highlight-overlay"></a></dfn> which is a tesselated overlay
525
-
over the entire tree,
526
-
the actively-highlighted portions of which are represented
523
+
<p>For each type of highlighting
524
+
there exists a <dfndata-dfn-type="dfn" data-noexport="" id="highlight-overlay">highlight overlay<aclass="self-link" href="#highlight-overlay"></a></dfn>,
525
+
the active portions of which are represented
527
526
by the corresponding <adata-link-type="dfn" href="#highlight-pseudo-elements">highlight pseudo-element</a>.
528
-
The <aclass="css" data-link-type="maybe" href="#selectordef-selection">::selection</a> overlay is drawn
529
-
over the <aclass="css" data-link-type="maybe" href="#selectordef-spelling-error">::spelling-error</a> overlay
530
-
which is drawn over the <aclass="css" data-link-type="maybe" href="#selectordef-grammar-error">::grammar-error</a> overlay. </p>
531
-
<p>Each box owns a piece of the overlay corresponding to any text or replaced content
532
-
directly contained by the box.</p>
527
+
Each box owns a piece of the overlay corresponding to any text or replaced content
528
+
directly contained by the box. </p>
533
529
<ul>
534
530
<li> For text, the corresponding overlay must cover at least the entire em box
535
531
and may extend further above/below the em box to the line box edges.
536
-
Spacing between two characters may also be part of the overlay,
532
+
Spacing between two characters may also be part of the overlay area,
537
533
in which case it belongs to the innermost element that contains both characters
538
534
and is selected when both characters are selected.
539
535
<li> For replaced content, the associated overlay must cover at least the entire replaced object,
<pclass="issue" id="issue-271a1b90"><aclass="self-link" href="#issue-271a1b90"></a> Not sure if this is the correct way of describing the way things work.</p>
(<aclass="css" data-link-type="maybe" href="#selectordef-selection">::selection</a> alone would apply to every element in the tree,
572
568
overriding the more specific styles of any ancestors.) </p>
573
569
<h3class="heading settled" data-level="3.5" id="highlight-painting"><spanclass="secno">3.5. </span><spanclass="content"> Painting the Highlight</span><aclass="self-link" href="#highlight-painting"></a></h3>
574
-
<p>The <aclass="css" data-link-type="maybe" href="#selectordef-selection">::selection</a> pseudo element draws its background
575
-
over the selected portion of the element,
570
+
<p>Each <adata-link-type="dfn" href="#highlight-pseudo-elements">highlight pseudo-element</a> draws its background
571
+
over the active portion of the overlay,
572
+
painting it
576
573
immediately below any positioned descendants
577
574
(i.e. just before step 8 in <ahref="http://www.w3.org/TR/CSS21/zindex.html">CSS2.1§E.2</a>).
578
575
It also suppresses the drawing of any selected text
579
576
(and any text decorations applied to that text)
580
577
and instead redraws that text
581
578
(and its decorations)
582
-
over that background
579
+
over the <adata-link-type="dfn" href="#highlight-overlay">highlight overlay</a> background
583
580
using the specified <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#color0">color</a>.</p>
584
581
<pclass="issue" id="issue-b85c3e18"><aclass="self-link" href="#issue-b85c3e18"></a> What should happen with text shadows?
585
582
Drawing them in their original color is disconcerting if that color is not a shade of gray.</p>
586
583
<p>For non-replaced content, the UA must honor the <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#color0">color</a> and <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#background-color">background-color</a> (including their alpha channels) as specified.
587
584
However, for replaced content, the UA should create a semi-transparent wash
588
585
to coat the content so that it can show through the selection.
589
586
This wash should be of the specified <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#background-color">background-color</a> if that is not <aclass="css" data-link-type="maybe" href="https://drafts.csswg.org/css-color-4/#valdef-color-transparent">transparent</a>,
590
-
else the specified <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#color0">color</a>;
587
+
else of the specified <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#color0">color</a>;
591
588
however the UA may adjust the alpha channel if it is opaque.</p>
<li><ahref="#dom-csspseudoelement-type">attribute for CSSPseudoElement</a><span>, in §6.1</span>
931
929
<li><ahref="#dom-csspseudochild-type">definition of</a><span>, in §6.1</span>
932
-
<li><ahref="#dom-csspseudoelementlist-getbytype-type-type">argument for CSSPseudoElementList/getByType(type)</a><span>, in §6.2</span>
933
-
<li><ahref="#dom-window-getpseudoelements-elt-type-type">argument for Window/getPseudoElements(elt, type)</a><span>, in §6.3</span>
934
930
</ul>
935
931
</ul>
936
932
<h3class="no-num heading settled" id="index-defined-elsewhere"><spanclass="content">Terms defined by reference</span><aclass="self-link" href="#index-defined-elsewhere"></a></h3>
0 commit comments