Skip to content

Commit 843318e

Browse files
committed
[css-text-decor] Additional clarifications to text line positions
1 parent 0142b72 commit 843318e

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed

css-text-decor/Overview.html

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,10 @@ <h2 id=line-decoration><span class=secno>2. </span> Line Decoration:
384384
href="#text-shadow"><code class=property>text-shadow</code></a>’,
385385
filters, and other graphical transformations likewise affect text
386386
decorations as part of the text they're drawn on, even if the decorations
387-
were specified on an ancestor box. (In the case of line decorations drawn
388-
over an atomic inline or across box decorations, they are similarly
389-
associated with the affected box rather than the <a
387+
were specified on an ancestor box, and do not affect the calculation of
388+
their initial positions or thicknesses. (In the case of line decorations
389+
drawn over an atomic inline or across box decorations, they are
390+
analogously associated with the affected box rather than the <a
390391
href="#decorating-box"><i>decorating box</i></a>.)
391392

392393
<div class=example>
@@ -947,10 +948,6 @@ <h3 id=text-underline-position-property><span class=secno>2.6. </span> Text
947948
<dd>In horizontal writing modes, the underline is positioned <i>under</i>
948949
the element's text content. In this case the underline usually does not
949950
cross the descenders. (This is sometimes called "accounting" underline.)
950-
(Note that images that are not affected by the underline per ‘<a
951-
href="#text-decoration-skip"><code
952-
class=property>text-decoration-skip</code></a>’ will not affect the
953-
position of the underline.)
954951
<div class=figure>
955952
<p><img
956953
alt="In a typical Latin font, the underline is far enough below the text that it does not cross the bottom of a 'g'."
@@ -1045,12 +1042,13 @@ <h3 id=line-position><span class=secno>2.7. </span> Determining the
10451042
consider, for each <a href="#decorating-box"><i>decorating box</i></a>,
10461043
the “ideal” positions of such line decorations per fragment of the <a
10471044
href="#decorating-box"><i>decorating box</i></a>—or its in-flow inline
1048-
descendant—that draws the text decoration. However, descendant fragments
1049-
of the <i>decorating element</i> that are skipped due to ‘<a
1045+
descendant—that draws the text decoration. However, descendants of the
1046+
<i>decorating element</i> that are skipped due to ‘<a
10501047
href="#text-decoration-skip"><code
1051-
class=property>text-decoration-skip</code></a>’ (including elements with
1052-
<code class=css>text-decoration-skip: ink</code>’) are excluded from
1053-
consideration.
1048+
class=property>text-decoration-skip</code></a>’, inline elements with
1049+
<code class=css>text-decoration-skip: ink</code>’, and any
1050+
descendants that do not participate in the <i>decorating element</i>’s
1051+
inline formatting context are excluded from consideration.
10541052

10551053
<p> The line decoration positions are then calculated as follows (treating
10561054
<a href="#underline-left"><i>over</i>-positioned underlines</a> as

css-text-decor/Overview.src.html

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,10 @@ <h2 id="line-decoration">
213213
calculation of the decoration's initial position on that line.
214214
The 'visibility' property, 'text-shadow', filters, and other graphical transformations
215215
likewise affect text decorations as part of the text they're drawn on,
216-
even if the decorations were specified on an ancestor box.
216+
even if the decorations were specified on an ancestor box,
217+
and do not affect the calculation of their initial positions or thicknesses.
217218
(In the case of line decorations drawn over an atomic inline
218-
or across box decorations, they are similarly associated with the affected box
219+
or across box decorations, they are analogously associated with the affected box
219220
rather than the <i>decorating box</i>.)
220221

221222
<div class="example">
@@ -608,9 +609,6 @@ <h3 id="text-underline-position-property">
608609
<i>under</i> the element's text content.
609610
In this case the underline usually does not cross the descenders.
610611
(This is sometimes called "accounting" underline.)
611-
(Note that images that are not affected by the underline per
612-
'text-decoration-skip' will not affect the position of the
613-
underline.)
614612
<div class="figure">
615613
<p><img title="text-underline-position: under"
616614
alt="In a typical Latin font, the underline is far enough
@@ -692,9 +690,10 @@ <h3 id="line-position">
692690
the “ideal” positions of such line decorations per fragment
693691
of the <i>decorating box</i>&mdash;or its in-flow inline descendant&mdash;that
694692
draws the text decoration.
695-
However, descendant fragments of the <i>decorating element</i>
696-
that are skipped due to 'text-decoration-skip'
697-
(including elements with ''text-decoration-skip: ink'')
693+
However, descendants of the <i>decorating element</i>
694+
that are skipped due to 'text-decoration-skip',
695+
inline elements with ''text-decoration-skip: ink'',
696+
and any descendants that do not participate in the <i>decorating element</i>’s inline formatting context
698697
are excluded from consideration.
699698

700699
<p>

0 commit comments

Comments
 (0)