Skip to content

Commit 8fc4dfb

Browse files
committed
[css-text-decor-3] Per WG resolution, make text-decoration *not* skip m/b/p of decorating elements' descendants.
1 parent bc16600 commit 8fc4dfb

2 files changed

Lines changed: 35 additions & 21 deletions

File tree

css-text-decor-3/Overview.html

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,15 @@ <h2 id=line-decoration><span class=secno>2. </span> Line Decoration:
348348
out-of-flow descendants, nor to the contents of atomic inline-level
349349
descendants such as inline blocks and inline tables.
350350

351-
<p>By default underlines, overlines, and line-throughs are applied only to
352-
text (including white space, letter spacing, and word spacing): margins,
353-
borders, and padding are skipped. Elements containing no text, such as
354-
images, are likewise not decorated. The ‘<a
351+
<p> By default underlines, overlines, and line-throughs are applied only to
352+
non-replaced inline boxes, and are drawn over all text (including white
353+
space, letter spacing, and word spacing). Elements containing no text,
354+
such as images, are not decorated. The ‘<a
355355
href="#text-decoration-skip"><code
356356
class=property>text-decoration-skip</code></a>’ property can be used to
357357
modify this behavior, for example allowing inline replaced elements to be
358-
underlined or requiring that white space be skipped.
358+
underlined or requiring that white space be skipped. Margins, borders, and
359+
padding of the element originating the decoration are always skipped.
359360

360361
<p>In determining the position and thickness of text decoration lines, user
361362
agents may consider the font sizes and dominant baselines of descendants,
@@ -711,7 +712,7 @@ <h3 id=text-decoration-skip-property><span class=secno>2.5. </span> Text
711712
<tr>
712713
<th><a href="#values">Value</a>:
713714

714-
<td>none | [ objects || spaces || ink || edges ]
715+
<td>none | [ objects || spaces || ink || edges || box-decoration ]
715716

716717
<tr>
717718
<th>Initial:
@@ -785,14 +786,22 @@ <h3 id=text-decoration-skip-property><span class=secno>2.5. </span> Text
785786
content edge of the decorating element so that, e.g. two underlined
786787
elements side-by-side do not appear to have a single underline. (This is
787788
important in Chinese, where underlining is a form of punctuation.)
788-
</dl>
789789

790-
<p class=issue>Do we need a value that <em>doesn't</em> skip margins and
791-
padding?
790+
<dt><dfn id=box-decoration
791+
title="text-decoration-skip:box-decoration"><code
792+
class=css>box-decoration</code></dfn>
793+
794+
<dd> Skip over the box's margin, border, and padding areas. Note that this
795+
only has an effect on decorations imposed by an ancestor.
796+
</dl>
792797

793798
<p class=note>Note that this property inherits and that descendant elements
794799
can have a different setting.
795800

801+
<p class=note> Note that CSS 2.1 required skipping margins, borders, and
802+
padding always. In this level, by default only the margins, borders, and
803+
padding of the <i>decorating element</i> are skipped.
804+
796805
<h4 id=text-underline-position-property><span class=secno>2.5.1. </span>
797806
Text Underline Position: the ‘<a href="#text-underline-position"><code
798807
class=property>text-underline-position</code></a>’ property</h4>

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

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ <h2 id="line-decoration">
185185
out-of-flow descendants, nor to the contents of atomic inline-level
186186
descendants such as inline blocks and inline tables.
187187

188-
<p>By default underlines, overlines, and line-throughs are applied only
189-
to text (including white space, letter spacing, and word spacing):
190-
margins, borders, and padding are skipped. Elements containing
191-
no text, such as images, are likewise not decorated.
192-
The 'text-decoration-skip'
193-
property can be used to modify this behavior, for example allowing
194-
inline replaced elements to be underlined or requiring that white
195-
space be skipped.
188+
<p>
189+
By default underlines, overlines, and line-throughs are applied only to non-replaced inline boxes,
190+
and are drawn over all text (including white space, letter spacing, and word spacing).
191+
Elements containing no text, such as images, are not decorated.
192+
The 'text-decoration-skip' property can be used to modify this behavior,
193+
for example allowing inline replaced elements to be underlined
194+
or requiring that white space be skipped.
195+
Margins, borders, and padding of the element originating the decoration are always skipped.
196196

197197
<p>In determining the position and thickness of text decoration lines,
198198
user agents may consider the font sizes and dominant baselines of
@@ -444,7 +444,7 @@ <h3 id="text-decoration-skip-property">
444444
<td><dfn>text-decoration-skip</dfn>
445445
<tr>
446446
<th><a href="#values">Value</a>:
447-
<td>none | [ objects || spaces || ink || edges ]
447+
<td>none | [ objects || spaces || ink || edges || box-decoration ]
448448

449449
<tr>
450450
<th>Initial:
@@ -496,14 +496,19 @@ <h3 id="text-decoration-skip-property">
496496
underlined elements side-by-side do not appear to have a single
497497
underline. (This is important in Chinese, where underlining is a
498498
form of punctuation.)</dd>
499+
<dt><dfn title="text-decoration-skip:box-decoration">''box-decoration''</dfn>
500+
<dd>
501+
Skip over the box's margin, border, and padding areas.
502+
Note that this only has an effect on decorations imposed by an ancestor.
499503
</dl>
500504

501-
<p class="issue">Do we need a value that <em>doesn't</em> skip
502-
margins and padding?</p>
503-
504505
<p class="note">Note that this property inherits and that descendant
505506
elements can have a different setting.</p>
506507

508+
<p class='note'>
509+
Note that CSS 2.1 required skipping margins, borders, and padding always.
510+
In this level, by default only the margins, borders, and padding of the <i>decorating element</i> are skipped.
511+
507512
<h4 id="text-underline-position-property">
508513
Text Underline Position: the 'text-underline-position' property</h4>
509514

0 commit comments

Comments
 (0)