Skip to content

Commit f45aa02

Browse files
committed
[css-text-decor-3] Move the text about position/color/style of decorations to the respective properties. Propose details for how to position decorations, awaiting WG agreement.
1 parent 48d6b6c commit f45aa02

2 files changed

Lines changed: 112 additions & 47 deletions

File tree

css-text-decor-3/Overview.html

Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
<meta content="CSS Text Decoration Module Level 3 (CSS3 Text Decoration)"
1313
name=dcterms.title>
1414
<meta content=text name=dcterms.type>
15-
<meta content=2012-10-15 name=dcterms.issued>
15+
<meta content=2012-10-16 name=dcterms.issued>
1616
<meta content="Elika J. Etemad" name=dcterms.creator>
1717
<meta content="Koji Ishii" name=dcterms.creator>
1818
<meta content=W3C name=dcterms.publisher>
19-
<meta content="http://www.w3.org/TR/2012/WD-css3-text-20121015/"
19+
<meta content="http://www.w3.org/TR/2012/WD-css3-text-20121016/"
2020
name=dcterms.identifier>
2121
<link href="#contents" rel=contents>
2222
<link href="#index" rel=index>
@@ -31,7 +31,7 @@
3131

3232
<h1>CSS Text Decoration Module Level 3</h1>
3333

34-
<h2 class="no-num no-toc" id=longstatus-date>W3C Working Draft 15 October
34+
<h2 class="no-num no-toc" id=longstatus-date>W3C Working Draft 16 October
3535
2012</h2>
3636

3737
<dl>
@@ -41,7 +41,7 @@ <h2 class="no-num no-toc" id=longstatus-date>W3C Working Draft 15 October
4141
-->
4242

4343
<dd><a
44-
href="http://www.w3.org/TR/2012/WD-css3-text-20121015/">http://www.w3.org/TR/2012/WD-css3-text-20121015/</a>
44+
href="http://www.w3.org/TR/2012/WD-css3-text-20121016/">http://www.w3.org/TR/2012/WD-css3-text-20121016/</a>
4545

4646
<dt>Latest version:
4747

@@ -361,27 +361,6 @@ <h2 id=line-decoration><span class=secno>2. </span> Line Decoration:
361361
the <a href="#decorating-box"><i>decorating box</i></a> are always
362362
skipped.
363363

364-
<p>In determining the position and thickness of text decoration lines, user
365-
agents may consider the font sizes and dominant baselines of descendants,
366-
but for a given element's decoration must use the same position and
367-
thickness throughout each line box. The <a
368-
href="#text-decoration-color">color</a> and <a
369-
href="#text-decoration-style">line style</a> of decorations must remain
370-
the same on all decorations applied by a given element, even if descendant
371-
boxes have different color or line style values.
372-
373-
<div class=example>
374-
<p>The following figure shows the averaging for underline:
375-
376-
<p><img
377-
alt="In the first rendering of the underlined text '1st a' with 'st' as a superscript, both the '1st' and the 'a' are rendered in a small font. In the second rendering, the 'a' is rendered in a larger font. In the third, both '1st' and 'a' are large."
378-
height=105 src=underline-averaging.gif width=326>
379-
380-
<p>In the three fragments of underlined text, the underline is drawn
381-
consecutively lower and thicker as the ratio of large text to small text
382-
increases.
383-
</div>
384-
385364
<p>Relatively positioning a descendant moves all text decorations applied
386365
to it along with the descendant's text; it does not affect calculation of
387366
the decoration's initial position on that line. The ‘<code
@@ -510,6 +489,53 @@ <h3 id=text-decoration-line-property><span class=secno>2.1. </span> Text
510489
rel=biblioentry>[CSS3-ANIMATIONS]<!--{{CSS3-ANIMATIONS}}--></a>.
511490
</dl>
512491

492+
<div class=issue>
493+
<p> In determining the position and thickness of text decoration lines,
494+
user agents should first determine an "ideal" size and position for every
495+
decorated fragment on the line, then position the decoration as follows:
496+
497+
<dl>
498+
<dt>overlines (and <i>over</i>-positioned underlines)
499+
500+
<dd> Position the line with respect to the highest <i>over</i> content
501+
edge of the decorated boxes.
502+
503+
<dt><a href="#alphabetic"><i>alphabetic</i></a> underlines
504+
505+
<dd> Position the line to an average of the ideal underlines of the
506+
decorated boxes, ignoring any boxes with non-initial ‘<code
507+
class=property>vertical-align</code>’, but below the lowest alphabetic
508+
baseline considered.
509+
510+
<dt>non-alphabetic underlines (and <i>under</i>-positioned overlines)
511+
512+
<dd> Position the line with respect to the lowest <i>under</i> content
513+
edge of the decorated boxes.
514+
515+
<dt>line-throughs
516+
517+
<dd> Position the line to an average of the ideal line-throughs of the
518+
decorated boxes, ignoring any boxes with non-initial ‘<code
519+
class=property>vertical-align</code>’. However, if this would place a
520+
line-through outside the middle third of a decorated box's content box,
521+
break the line-through, treating the line-through of that box and its
522+
descendants as an independent decoration for the purpose of determining
523+
the line's position and thickness.
524+
</dl>
525+
</div>
526+
527+
<div class=example>
528+
<p>The following figure shows the averaging for underline:
529+
530+
<p><img
531+
alt="In the first rendering of the underlined text '1st a' with 'st' as a superscript, both the '1st' and the 'a' are rendered in a small font. In the second rendering, the 'a' is rendered in a larger font. In the third, both '1st' and 'a' are large."
532+
height=105 src=underline-averaging.gif width=326>
533+
534+
<p>In the three fragments of underlined text, the underline is drawn
535+
consecutively lower and thicker as the ratio of large text to small text
536+
increases.
537+
</div>
538+
513539
<h3 id=text-decoration-color-property><span class=secno>2.2. </span> Text
514540
Decoration Color: the ‘<a href="#text-decoration-color"><code
515541
class=property>text-decoration-color</code></a>’ property</h3>
@@ -564,6 +590,10 @@ <h3 id=text-decoration-color-property><span class=secno>2.2. </span> Text
564590
href="#text-decoration-line"><code
565591
class=property>text-decoration-line</code></a>’.
566592

593+
<p> The color of text decorations must remain the same on all decorations
594+
originating from a given element, even if descendant boxes have different
595+
specified colors.
596+
567597
<h3 id=text-decoration-style-property><span class=secno>2.3. </span> Text
568598
Decoration Style: the ‘<a href="#text-decoration-style"><code
569599
class=property>text-decoration-style</code></a>’ property</h3>
@@ -619,6 +649,10 @@ <h3 id=text-decoration-style-property><span class=secno>2.3. </span> Text
619649
rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>. ‘<code
620650
class=css>wavy</code>’ indicates a wavy line.
621651

652+
<p> The style of text decorations must remain the same on all decorations
653+
originating from a given element, even if descendant boxes have different
654+
specified styles.
655+
622656
<h3 id=text-decoration-property><span class=secno>2.4. </span> Text
623657
Decoration Shorthand: the ‘<a href="#text-decoration"><code
624658
class=property>text-decoration</code></a>’ property</h3>

css-text-decor-3/Overview.src.html

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -196,28 +196,6 @@ <h2 id="line-decoration">
196196
or requiring that white space be skipped.
197197
Margins, borders, and padding of the <i>decorating box</i> are always skipped.
198198

199-
<p>In determining the position and thickness of text decoration lines,
200-
user agents may consider the font sizes and dominant baselines of
201-
descendants, but for a given element's decoration must use the same
202-
position and thickness throughout each line box. The
203-
<a href="#text-decoration-color">color</a> and
204-
<a href="#text-decoration-style">line style</a> of decorations must
205-
remain the same on all decorations applied by a given element, even
206-
if descendant boxes have different color or line style values.</p>
207-
208-
<div class="example">
209-
<p>The following figure shows the averaging for underline:
210-
<p><img alt="In the first rendering of the underlined text '1st a'
211-
with 'st' as a superscript, both the '1st' and the 'a'
212-
are rendered in a small font. In the second rendering,
213-
the 'a' is rendered in a larger font. In the third, both
214-
'1st' and 'a' are large."
215-
height="105" src="underline-averaging.gif" width="326">
216-
<p>In the three fragments of underlined text, the underline is drawn
217-
consecutively lower and thicker as the ratio of large text to small
218-
text increases.</p>
219-
</div>
220-
221199
<p>Relatively positioning a descendant moves all text decorations
222200
applied to it along with the descendant's text; it does not affect
223201
calculation of the decoration's initial position on that line.
@@ -311,6 +289,51 @@ <h3 id="text-decoration-line-property">
311289
This value is <strong>deprecated</strong> in favor of Animations [[CSS3-ANIMATIONS]].
312290
</dl>
313291

292+
<div class='issue'>
293+
<p>
294+
In determining the position and thickness of text decoration lines,
295+
user agents should first determine an "ideal" size and position for every decorated fragment on the line,
296+
then position the decoration as follows:
297+
298+
<dl>
299+
<dt>overlines (and <i>over</i>-positioned underlines)
300+
<dd>
301+
Position the line with respect to the highest <i>over</i> content edge of the decorated boxes.
302+
303+
<dt><i>alphabetic</i> underlines
304+
<dd>
305+
Position the line to an average of the ideal underlines of the decorated boxes,
306+
ignoring any boxes with non-initial 'vertical-align',
307+
but below the lowest alphabetic baseline considered.
308+
309+
<dt>non-alphabetic underlines (and <i>under</i>-positioned overlines)
310+
<dd>
311+
Position the line with respect to the lowest <i>under</i> content edge of the decorated boxes.
312+
313+
<dt>line-throughs
314+
<dd>
315+
Position the line to an average of the ideal line-throughs of the decorated boxes,
316+
ignoring any boxes with non-initial 'vertical-align'.
317+
However, if this would place a line-through outside the middle third of a decorated box's content box,
318+
break the line-through,
319+
treating the line-through of that box and its descendants as an independent decoration
320+
for the purpose of determining the line's position and thickness.
321+
</dl>
322+
</div>
323+
324+
<div class="example">
325+
<p>The following figure shows the averaging for underline:
326+
<p><img alt="In the first rendering of the underlined text '1st a'
327+
with 'st' as a superscript, both the '1st' and the 'a'
328+
are rendered in a small font. In the second rendering,
329+
the 'a' is rendered in a larger font. In the third, both
330+
'1st' and 'a' are large."
331+
height="105" src="underline-averaging.gif" width="326">
332+
<p>In the three fragments of underlined text, the underline is drawn
333+
consecutively lower and thicker as the ratio of large text to small
334+
text increases.</p>
335+
</div>
336+
314337
<h3 id="text-decoration-color-property">
315338
Text Decoration Color: the 'text-decoration-color' property</h3>
316339

@@ -346,6 +369,10 @@ <h3 id="text-decoration-color-property">
346369
overlines, and line-throughs) set on the element with
347370
'text-decoration-line'.</p>
348371

372+
<p>
373+
The color of text decorations must remain the same on all decorations originating from a given element,
374+
even if descendant boxes have different specified colors.
375+
349376
<h3 id="text-decoration-style-property">
350377
Text Decoration Style: the 'text-decoration-style' property</h3>
351378

@@ -383,6 +410,10 @@ <h3 id="text-decoration-style-property">
383410
<a href="http://www.w3.org/TR/css3-background/#the-border-style">border-style
384411
properties</a> [[!CSS3BG]]. ''wavy'' indicates a wavy line.</p>
385412

413+
<p>
414+
The style of text decorations must remain the same on all decorations originating from a given element,
415+
even if descendant boxes have different specified styles.
416+
386417
<h3 id="text-decoration-property">
387418
Text Decoration Shorthand: the 'text-decoration' property</h3>
388419

0 commit comments

Comments
 (0)