Skip to content

Commit c88393b

Browse files
committed
[css-text-decor-3] Remove commented-out section that's been ported to L4.
1 parent 9cda403 commit c88393b

File tree

1 file changed

+0
-98
lines changed

1 file changed

+0
-98
lines changed

css-text-decor-3/Overview.bs

-98
Original file line numberDiff line numberDiff line change
@@ -531,104 +531,6 @@ Text Underline Position: the 'text-underline-position' property</h3>
531531
-->
532532
</div>
533533

534-
<!--
535-
<h3 id="line-position">
536-
Determining the Position and Thickness of Line Decorations</h3>
537-
538-
Since line decorations can span elements with varying font sizes and
539-
vertical alignments, the best position for a line decoration is not
540-
necessarily the ideal position dictated by the <i>decorating box</i>.
541-
Instead, it's calculated, per line, from all text decorated by the <i>decorating box</i> on that line,
542-
the <dfn>considered text</dfn>.
543-
However, descendants of the <i>decorating box</i>
544-
that are skipped due to 'text-decoration-skip',
545-
descendant inlines with ''text-decoration-skip: ink'',
546-
and any descendants that do not participate in the <i>decorating box</i>’s inline formatting context
547-
are excluded from the set of <i>considered text</i>.
548-
549-
550-
The line decoration positions are then calculated
551-
per line
552-
as follows
553-
(treating <a href="#underline-left"><i>over</i>-positioned underlines</a> as <i>over</i> lines
554-
and <a href="#underline-left"><i>under</i>-positioned overlines</a> as <i>under</i> lines):
555-
556-
<dl>
557-
<dt><a href="https://www.w3.org/TR/css-writing-modes/#over"><i>over</i></a> lines
558-
<dd>
559-
Align the line decoration with respect to the highest
560-
<a href="https://www.w3.org/TR/css-writing-modes/#over"><i>over</i></a> EM-box edge
561-
of the <i>considered text</i>.
562-
563-
<dt><a href="#underline-alphabetic"><i>alphabetic</i></a> underlines
564-
<dd>
565-
The alphabetic underline position is calculated by taking
566-
the ideal offset (from the alphabetic baseline) of each run of <i>considered text</i>,
567-
averaging those, and then using the lowest alphabetic baseline to actually position the line.
568-
(Alphabetic baselines can differ between ''baseline''-aligned boxes
569-
if the dominant baseline is non-alphabetic.)
570-
To prevent superscripts and subscripts from throwing this position off-kilter,
571-
an inline with a non-initial computed 'vertical-align'
572-
is treated as having the ideal underline position of its parent.
573-
574-
<dt>non-alphabetic <a href="https://www.w3.org/TR/css-writing-modes/#under"><i>under</i></a> lines
575-
<dd>
576-
Position the line decoration with respect to the lowest
577-
<a href="https://www.w3.org/TR/css-writing-modes/#under"><i>under</i></a> EM-box edge
578-
of the <i>considered text</i>.
579-
580-
<dt>line-throughs
581-
<dd>
582-
Line-throughs essentially use the same sort of averaging as for alphabetic underlines,
583-
but recompute the position when drawing across a descendant with a different computed 'font-size'.
584-
(This ensures that the text remains effectively “crossed out” despite any font size changes.)
585-
For each run of <i>considered text</i> with the same 'font-size',
586-
compute an ideal position averaged from its font metrics.
587-
To prevent superscripts and subscripts from throwing this position off-kilter,
588-
an inline with a non-initial computed 'vertical-align'
589-
is treated as having the ideal underline position of its parent.
590-
Position the portion of the line across each decorated fragment at that position.
591-
592-
<p class='issue'>
593-
For simplicity, line-throughs should draw over each element at that element's preferred/averaged position.
594-
This can produce some undesirable jumpiness,
595-
but there doesn't appear to be any way to avoid that which is correct in all instances,
596-
and all attempts are worryingly complex.
597-
What position should line-throughts adopt over elements that have a different font-size,
598-
but no <i>considered text</i>?
599-
</dl>
600-
601-
602-
CSS does not define the thickness of line decorations.
603-
In determining the thickness of text decoration lines,
604-
user agents may consider the font sizes, faces, and weights of descendants
605-
to provide an appropriately averaged thickness.
606-
607-
<div class="example">
608-
The following figure shows the averaging for underline:
609-
610-
<img alt="In the first rendering of the underlined text '1st a'
611-
with 'st' as a superscript, both the '1st' and the 'a'
612-
are rendered in a small font. In the second rendering,
613-
the 'a' is rendered in a larger font. In the third, both
614-
'1st' and 'a' are large."
615-
height="105" src="images/underline-averaging.gif" width="326">
616-
617-
In the three fragments of underlined text, the underline is drawn
618-
consecutively lower and thicker as the ratio of large text to small
619-
text increases.
620-
621-
Using the same example, a line-through would in the second fragment,
622-
instead of averaging the two font sizes,
623-
split the line-through into two segments:
624-
625-
<img alt="" src="images/linethrough-averaging.gif">
626-
627-
In both cases, however, the superscript, due to the vertical-alignment shift,
628-
has no effect on the position of the line.
629-
</div>
630-
-->
631-
632534
Some font formats (such as OpenType) can offer information
633535
about the appropriate position of a line decoration.
634536
The UA should use such information

0 commit comments

Comments
 (0)