Skip to content

Commit 3138625

Browse files
committed
[css-pseudo] Editorial tweaks to highlight overlay description
1 parent cd45de5 commit 3138625

File tree

2 files changed

+37
-43
lines changed

2 files changed

+37
-43
lines changed

css-pseudo/Overview.bs

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -497,25 +497,18 @@ Styling Highlights</h3>
497497
<h3 id=highlight-bounds>
498498
Area of a Highlight</h3>
499499

500-
<p>For each instance of highlighting
501-
there exists a <dfn>root highlight overlay</dfn>
502-
which is a tesselated overlay
503-
over the entire tree,
504-
the actively-highlighted portions of which are represented
500+
<p>For each type of highlighting
501+
there exists a <dfn>highlight overlay</dfn>,
502+
the active portions of which are represented
505503
by the corresponding <a>highlight pseudo-element</a>.
506-
The ''::selection'' overlay is drawn
507-
over the ''::spelling-error'' overlay
508-
which is drawn over the ''::grammar-error'' overlay.
509-
510-
511504
Each box owns a piece of the overlay corresponding to any text or replaced content
512505
directly contained by the box.
513506

514507
<ul>
515508
<li>
516509
For text, the corresponding overlay must cover at least the entire em box
517510
and may extend further above/below the em box to the line box edges.
518-
Spacing between two characters may also be part of the overlay,
511+
Spacing between two characters may also be part of the overlay area,
519512
in which case it belongs to the innermost element that contains both characters
520513
and is selected when both characters are selected.
521514
<li>
@@ -539,7 +532,7 @@ Area of a Highlight</h3>
539532
<h3 id=highlight-cascade>
540533
Cascading and Per-Element Highlight Styles</h3>
541534

542-
Each element draws its own portion of the <a>root highlight overlay</a>,
535+
Each element draws its own portion of the <a>highlight overlay</a>,
543536
which receives the styles specified by the <a>highlight pseudo-element</a> styles
544537
for which it or one of its ancestors is the <i>originating element</i>.
545538
When multiple styles conflict,
@@ -578,15 +571,16 @@ Cascading and Per-Element Highlight Styles</h3>
578571
<h3 id="highlight-painting">
579572
Painting the Highlight</h3>
580573

581-
The ''::selection'' pseudo element draws its background
582-
over the selected portion of the element,
574+
Each <a>highlight pseudo-element</a> draws its background
575+
over the active portion of the overlay,
576+
painting it
583577
immediately below any positioned descendants
584578
(i.e. just before step 8 in <a href="http://www.w3.org/TR/CSS21/zindex.html">CSS2.1&sect;E.2</a>).
585579
It also suppresses the drawing of any selected text
586580
(and any text decorations applied to that text)
587581
and instead redraws that text
588582
(and its decorations)
589-
over that background
583+
over the <a>highlight overlay</a> background
590584
using the specified 'color'.
591585

592586
Issue: What should happen with text shadows?
@@ -597,11 +591,15 @@ Painting the Highlight</h3>
597591
However, for replaced content, the UA should create a semi-transparent wash
598592
to coat the content so that it can show through the selection.
599593
This wash should be of the specified 'background-color' if that is not ''transparent'',
600-
else the specified 'color';
594+
else of the specified 'color';
601595
however the UA may adjust the alpha channel if it is opaque.
602596

597+
The ''::selection'' overlay is drawn
598+
over the ''::spelling-error'' overlay
599+
which is drawn over the ''::grammar-error'' overlay.
600+
603601
<h3 id="highlight-security">
604-
Security Considerations</h3>
602+
Security and Privacy Considerations</h3>
605603

606604
Because the styling of spelling and grammar errors
607605
can leak information about the contents of a user's dictionary

css-pseudo/Overview.html

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<div class="head">
5757
<p data-fill-with="logo"><a class="logo" href="http://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/Icons/w3c_home" width="72"> </a> </p>
5858
<h1 class="p-name no-ref" id="title">CSS Pseudo-Elements Module Level 4</h1>
59-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2015-12-11">11 December 2015</time></span></h2>
59+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2016-01-03">3 January 2016</time></span></h2>
6060
<div data-fill-with="spec-metadata">
6161
<dl>
6262
<dt>This version:
@@ -80,7 +80,7 @@ <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="cont
8080
</dl>
8181
</div>
8282
<div data-fill-with="warning"></div>
83-
<p class="copyright" data-fill-with="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2015 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply. </p>
83+
<p class="copyright" data-fill-with="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2016 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply. </p>
8484
<hr title="Separator for header">
8585
</div>
8686
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
@@ -141,7 +141,7 @@ <h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="cont
141141
<li><a href="#highlight-bounds"><span class="secno">3.3</span> <span class="content"> Area of a Highlight</span></a>
142142
<li><a href="#highlight-cascade"><span class="secno">3.4</span> <span class="content"> Cascading and Per-Element Highlight Styles</span></a>
143143
<li><a href="#highlight-painting"><span class="secno">3.5</span> <span class="content"> Painting the Highlight</span></a>
144-
<li><a href="#highlight-security"><span class="secno">3.6</span> <span class="content"> Security Considerations</span></a>
144+
<li><a href="#highlight-security"><span class="secno">3.6</span> <span class="content"> Security and Privacy Considerations</span></a>
145145
</ul>
146146
<li>
147147
<a href="#treelike"><span class="secno">4</span> <span class="content"> Tree-Abiding Pseudo-elements</span></a>
@@ -520,20 +520,16 @@ <h3 class="heading settled" data-level="3.2" id="highlight-styling"><span class=
520520
Note: Because <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-emphasis-color">text-emphasis-color</a> defaults to <span class="css">currrentColor</span>,
521521
it will by default also set the color of the the emphasis marks.</p>
522522
<h3 class="heading settled" data-level="3.3" id="highlight-bounds"><span class="secno">3.3. </span><span class="content"> Area of a Highlight</span><a class="self-link" href="#highlight-bounds"></a></h3>
523-
<p>For each instance of highlighting
524-
there exists a <dfn data-dfn-type="dfn" data-noexport="" id="root-highlight-overlay">root highlight overlay<a class="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 <dfn data-dfn-type="dfn" data-noexport="" id="highlight-overlay">highlight overlay<a class="self-link" href="#highlight-overlay"></a></dfn>,
525+
the active portions of which are represented
527526
by the corresponding <a data-link-type="dfn" href="#highlight-pseudo-elements">highlight pseudo-element</a>.
528-
The <a class="css" data-link-type="maybe" href="#selectordef-selection">::selection</a> overlay is drawn
529-
over the <a class="css" data-link-type="maybe" href="#selectordef-spelling-error">::spelling-error</a> overlay
530-
which is drawn over the <a class="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>
533529
<ul>
534530
<li> For text, the corresponding overlay must cover at least the entire em box
535531
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,
537533
in which case it belongs to the innermost element that contains both characters
538534
and is selected when both characters are selected.
539535
<li> For replaced content, the associated overlay must cover at least the entire replaced object,
@@ -544,7 +540,7 @@ <h3 class="heading settled" data-level="3.3" id="highlight-bounds"><span class="
544540
<p class="issue" id="issue-b6466947"><a class="self-link" href="#issue-b6466947"></a> See <a href="http://lists.w3.org/Archives/Public/www-style/2008Nov/0022.html">F2F minutes</a>, <a href="http://lists.w3.org/Archives/Public/www-style/2008Oct/0268.html">dbaron’s message</a>, <a href="http://lists.w3.org/Archives/Public/www-style/2010May/0247.html">Daniel’s thread</a>, <a href="http://lists.w3.org/Archives/Public/www-style/2010May/0261.html">Gecko notes</a>, <a href="http://lists.w3.org/Archives/Public/www-style/2010May/0366.html">Opera notes</a>, <a href="http://lists.w3.org/Archives/Public/www-style/2010May/0280.html">Webkit notes</a></p>
545541
<p class="issue" id="issue-271a1b90"><a class="self-link" href="#issue-271a1b90"></a> Not sure if this is the correct way of describing the way things work.</p>
546542
<h3 class="heading settled" data-level="3.4" id="highlight-cascade"><span class="secno">3.4. </span><span class="content"> Cascading and Per-Element Highlight Styles</span><a class="self-link" href="#highlight-cascade"></a></h3>
547-
<p>Each element draws its own portion of the <a data-link-type="dfn" href="#root-highlight-overlay">root highlight overlay</a>,
543+
<p>Each element draws its own portion of the <a data-link-type="dfn" href="#highlight-overlay">highlight overlay</a>,
548544
which receives the styles specified by the <a data-link-type="dfn" href="#highlight-pseudo-elements">highlight pseudo-element</a> styles
549545
for which it or one of its ancestors is the <i>originating element</i>.
550546
When multiple styles conflict,
@@ -571,25 +567,29 @@ <h3 class="heading settled" data-level="3.4" id="highlight-cascade"><span class=
571567
(<a class="css" data-link-type="maybe" href="#selectordef-selection">::selection</a> alone would apply to every element in the tree,
572568
overriding the more specific styles of any ancestors.) </p>
573569
<h3 class="heading settled" data-level="3.5" id="highlight-painting"><span class="secno">3.5. </span><span class="content"> Painting the Highlight</span><a class="self-link" href="#highlight-painting"></a></h3>
574-
<p>The <a class="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 <a data-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
576573
immediately below any positioned descendants
577574
(i.e. just before step 8 in <a href="http://www.w3.org/TR/CSS21/zindex.html">CSS2.1§E.2</a>).
578575
It also suppresses the drawing of any selected text
579576
(and any text decorations applied to that text)
580577
and instead redraws that text
581578
(and its decorations)
582-
over that background
579+
over the <a data-link-type="dfn" href="#highlight-overlay">highlight overlay</a> background
583580
using the specified <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#color0">color</a>.</p>
584581
<p class="issue" id="issue-b85c3e18"><a class="self-link" href="#issue-b85c3e18"></a> What should happen with text shadows?
585582
Drawing them in their original color is disconcerting if that color is not a shade of gray.</p>
586583
<p>For non-replaced content, the UA must honor the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#color0">color</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#background-color">background-color</a> (including their alpha channels) as specified.
587584
However, for replaced content, the UA should create a semi-transparent wash
588585
to coat the content so that it can show through the selection.
589586
This wash should be of the specified <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#background-color">background-color</a> if that is not <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-color-4/#valdef-color-transparent">transparent</a>,
590-
else the specified <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#color0">color</a>;
587+
else of the specified <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#color0">color</a>;
591588
however the UA may adjust the alpha channel if it is opaque.</p>
592-
<h3 class="heading settled" data-level="3.6" id="highlight-security"><span class="secno">3.6. </span><span class="content"> Security Considerations</span><a class="self-link" href="#highlight-security"></a></h3>
589+
<p>The <a class="css" data-link-type="maybe" href="#selectordef-selection">::selection</a> overlay is drawn
590+
over the <a class="css" data-link-type="maybe" href="#selectordef-spelling-error">::spelling-error</a> overlay
591+
which is drawn over the <a class="css" data-link-type="maybe" href="#selectordef-grammar-error">::grammar-error</a> overlay.</p>
592+
<h3 class="heading settled" data-level="3.6" id="highlight-security"><span class="secno">3.6. </span><span class="content"> Security and Privacy Considerations</span><a class="self-link" href="#highlight-security"></a></h3>
593593
<p>Because the styling of spelling and grammar errors
594594
can leak information about the contents of a user’s dictionary
595595
(which can include the user’s name and even includes the contents of his/her address book!)
@@ -893,7 +893,6 @@ <h3 class="no-num heading settled" id="index-defined-here"><span class="content"
893893
<li><a href="#selectordef-before">::before</a><span>, in §4.1</span>
894894
<li><a href="#csspseudoelement">CSSPseudoElement</a><span>, in §6.1</span>
895895
<li><a href="#csspseudoelementlist">CSSPseudoElementList</a><span>, in §6.2</span>
896-
<li><a href="#dom-window-getpseudoelements-elt-type-elt">elt</a><span>, in §6.3</span>
897896
<li><a href="#fictional-tag-sequence">fictional tag sequence</a><span>, in §2.1</span>
898897
<li><a href="#first-formatted-line">first formatted line</a><span>, in §2.1.1</span>
899898
<li><a href="#selectordef-first-letter">::first-letter</a><span>, in §2.2</span>
@@ -903,8 +902,8 @@ <h3 class="no-num heading settled" id="index-defined-here"><span class="content"
903902
<li><a href="#dom-window-getpseudochildren">getPseudoElements()</a><span>, in §6.3</span>
904903
<li><a href="#dom-window-getpseudoelements">getPseudoElements(elt, type)</a><span>, in §6.3</span>
905904
<li><a href="#selectordef-grammar-error">::grammar-error</a><span>, in §3.1</span>
905+
<li><a href="#highlight-overlay">highlight overlay</a><span>, in §3.3</span>
906906
<li><a href="#highlight-pseudo-elements">highlight pseudo-elements</a><span>, in §3.1</span>
907-
<li><a href="#dom-csspseudoelementlist-item-index-index">index</a><span>, in §6.2</span>
908907
<li><a href="#dom-csspseudochildlist-item">item()</a><span>, in §6.2</span>
909908
<li><a href="#dom-csspseudoelementlist-item">item(index)</a><span>, in §6.2</span>
910909
<li>
@@ -915,7 +914,6 @@ <h3 class="no-num heading settled" id="index-defined-here"><span class="content"
915914
</ul>
916915
<li><a href="#selectordef-marker">::marker</a><span>, in §4.2</span>
917916
<li><a href="#selectordef-placeholder">::placeholder</a><span>, in §4.3</span>
918-
<li><a href="#root-highlight-overlay">root highlight overlay</a><span>, in §3.3</span>
919917
<li><a href="#selectordef-selection">::selection</a><span>, in §3.1</span>
920918
<li><a href="#selectordef-spelling-error">::spelling-error</a><span>, in §3.1</span>
921919
<li>
@@ -929,8 +927,6 @@ <h3 class="no-num heading settled" id="index-defined-here"><span class="content"
929927
<ul>
930928
<li><a href="#dom-csspseudoelement-type">attribute for CSSPseudoElement</a><span>, in §6.1</span>
931929
<li><a href="#dom-csspseudochild-type">definition of</a><span>, in §6.1</span>
932-
<li><a href="#dom-csspseudoelementlist-getbytype-type-type">argument for CSSPseudoElementList/getByType(type)</a><span>, in §6.2</span>
933-
<li><a href="#dom-window-getpseudoelements-elt-type-type">argument for Window/getPseudoElements(elt, type)</a><span>, in §6.3</span>
934930
</ul>
935931
</ul>
936932
<h3 class="no-num heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
@@ -1063,7 +1059,7 @@ <h3 class="no-num heading settled" id="normative"><span class="content">Normativ
10631059
<dt id="biblio-css-ui-3"><a class="self-link" href="#biblio-css-ui-3"></a>[CSS-UI-3]
10641060
<dd>Tantek Çelik; Florian Rivoal. <a href="http://www.w3.org/TR/css-ui-3/">CSS Basic User Interface Module Level 3 (CSS3 UI)</a>. 7 July 2015. CR. URL: <a href="http://www.w3.org/TR/css-ui-3/">http://www.w3.org/TR/css-ui-3/</a>
10651061
<dt id="biblio-css-writing-modes-3"><a class="self-link" href="#biblio-css-writing-modes-3"></a>[CSS-WRITING-MODES-3]
1066-
<dd>Elika Etemad; Koji Ishii. <a href="http://www.w3.org/TR/css-writing-modes-3/">CSS Writing Modes Level 3</a>. 20 March 2014. CR. URL: <a href="http://www.w3.org/TR/css-writing-modes-3/">http://www.w3.org/TR/css-writing-modes-3/</a>
1062+
<dd>Elika Etemad; Koji Ishii. <a href="http://www.w3.org/TR/css-writing-modes-3/">CSS Writing Modes Level 3</a>. 15 December 2015. CR. URL: <a href="http://www.w3.org/TR/css-writing-modes-3/">http://www.w3.org/TR/css-writing-modes-3/</a>
10671063
<dt id="biblio-cssom"><a class="self-link" href="#biblio-cssom"></a>[CSSOM]
10681064
<dd>Simon Pieters; Glenn Adams. <a href="http://www.w3.org/TR/cssom/">CSS Object Model (CSSOM)</a>. 5 December 2013. WD. URL: <a href="http://www.w3.org/TR/cssom/">http://www.w3.org/TR/cssom/</a>
10691065
<dt id="biblio-dom-ls"><a class="self-link" href="#biblio-dom-ls"></a>[DOM-LS]
@@ -1090,7 +1086,7 @@ <h3 class="no-num heading settled" id="informative"><span class="content">Inform
10901086
<dt id="biblio-css3-fonts"><a class="self-link" href="#biblio-css3-fonts"></a>[CSS3-FONTS]
10911087
<dd>John Daggett. <a href="http://www.w3.org/TR/css-fonts-3/">CSS Fonts Module Level 3</a>. 3 October 2013. CR. URL: <a href="http://www.w3.org/TR/css-fonts-3/">http://www.w3.org/TR/css-fonts-3/</a>
10921088
<dt id="biblio-css3-writing-modes"><a class="self-link" href="#biblio-css3-writing-modes"></a>[CSS3-WRITING-MODES]
1093-
<dd>Elika Etemad; Koji Ishii. <a href="http://www.w3.org/TR/css-writing-modes-3/">CSS Writing Modes Level 3</a>. 20 March 2014. CR. URL: <a href="http://www.w3.org/TR/css-writing-modes-3/">http://www.w3.org/TR/css-writing-modes-3/</a>
1089+
<dd>Elika Etemad; Koji Ishii. <a href="http://www.w3.org/TR/css-writing-modes-3/">CSS Writing Modes Level 3</a>. 15 December 2015. CR. URL: <a href="http://www.w3.org/TR/css-writing-modes-3/">http://www.w3.org/TR/css-writing-modes-3/</a>
10941090
<dt id="biblio-html5"><a class="self-link" href="#biblio-html5"></a>[HTML5]
10951091
<dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/html5/">HTML5</a>. 28 October 2014. REC. URL: <a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a>
10961092
</dl>

0 commit comments

Comments
 (0)