Skip to content

Commit c31e395

Browse files
committed
Work on text-shadow issues
1 parent 2c84e53 commit c31e395

2 files changed

Lines changed: 61 additions & 61 deletions

File tree

css3-text/Overview.html

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 17 January
9090
<dt>This version:
9191

9292
<dd><a href="http://dev.w3.org/csswg/css3-text/Overview.html">$Date:
93-
2011/01/17 03:42:43 $ (CVS $Revision$)</a> <!--<dd><a
93+
2011/01/17 05:56:44 $ (CVS $Revision$)</a> <!--<dd><a
9494
href="http://www.w3.org/TR/2010/WD-css3-text-20101005/">http://www.w3.org/TR/2010/WD-css3-text-20101005/</a></dd> -->
9595

9696

@@ -3677,7 +3677,7 @@ <h3 id=hanging-punctuation><span class=secno>10.2. </span> Hanging
36773677
<tr>
36783678
<th>Applies to:
36793679

3680-
<td>block containers
3680+
<td>inline elements
36813681

36823682
<tr>
36833683
<th>Inherited:
@@ -3701,49 +3701,45 @@ <h3 id=hanging-punctuation><span class=secno>10.2. </span> Hanging
37013701
</table>
37023702

37033703
<p>This property determines whether a punctuation mark, if one is present,
3704-
may be placed outside the line box at the start or at the end of a full
3705-
line of text. Values have the following meanings:
3704+
may be placed outside the line box (or in the indent) at the start or at
3705+
the end of a full line of text. Such hanging punctuation is not considered
3706+
when measuring the line's contents for indentation, alignment, or
3707+
justification. Values have the following meanings:
37063708

37073709
<dl>
37083710
<dt><dfn id=first
37093711
title="hanging-punctuation:first"><code>first</code></dfn>
37103712

37113713
<dd>Punctuation (specifically, opening brackets and quotes) may hang
3712-
outside the start edge of the first line: such punctuation is not
3713-
considered when measuring the line's contents for indentation, alignment,
3714-
or justification. This applies to all characters in the Unicode
3715-
categories Ps, Pf, Pi.
3714+
outside the start edge of the first line. This applies to all characters
3715+
in the Unicode categories Ps, Pf, Pi.
37163716

37173717
<dt><dfn id=last title="hanging-punctuation:last"><code>last</code></dfn>
37183718

37193719
<dd>Punctuation (specifically, closing brackets and quotes) may hang
3720-
outside the start edge of the first line: such punctuation is not
3721-
considered when measuring the line's contents for alignment or
3722-
justification. This applies to all characters in the Unicode categories
3723-
Pe, Pf, and Pi as well as the stops and commas listed below.
3720+
outside the start edge of the first line. This applies to all characters
3721+
in the Unicode categories Pe, Pf, and Pi.
37243722

37253723
<dt><dfn id=allow-end
37263724
title="hanging-punctuation:allow-end"><code>allow-end</code></dfn>
37273725

37283726
<dd>Punctuation (specifically, stops and commas) may hang outside the end
37293727
edge of any line if the punctuation does not otherwise fit prior to
3730-
justification: such punctuation is not considered when measuring the
3731-
line's contents for alignment or justification.
3728+
justification.
37323729

37333730
<dt><dfn id=force-end0
37343731
title="hanging-punctuation:force-end"><code>force-end</code></dfn>
37353732

37363733
<dd>Punctuation (specifically, stops and commas) may hang outside the end
3737-
edge of any line: such punctuation is not considered when measuring the
3738-
line's contents for alignment or justification.
3734+
edge of any line.
37393735
</dl>
37403736

37413737
<p>Stops and commas allowed to hang include: U+002C COMMA, U+002E FULL
3742-
STOP, U+060C ARABIC COMMA, U+06D4 ARABIC FULl STOP, U+3001 IDEOGRAPHIC
3738+
STOP, U+060C ARABIC COMMA, U+06D4 ARABIC FULL STOP, U+3001 IDEOGRAPHIC
37433739
COMMA, U+3002 IDEOGRAPHIC FULL STOP, U+FF0C FULLWIDTH COMMA, U+FF0E
37443740
FULLWIDTH FULL STOP, U+FE50 SMALL COMMA, U+FE51 SMALL IDEOGRAPHIC COMMA,
37453741
U+FE52 SMALL FULL STOP, U+FF61 HALFWIDTH IDEOGRAPHIC FULL STOP, U+FF64
3746-
HALFWIDTH IDEOGRAPHIC COMMA, The UA may include other characters as
3742+
HALFWIDTH IDEOGRAPHIC COMMA. The UA may include other characters as
37473743
appropriate.
37483744

37493745
<p class=issue>Should other characters be included?
@@ -3752,10 +3748,13 @@ <h3 id=hanging-punctuation><span class=secno>10.2. </span> Hanging
37523748
inform the working group of such additional characters.
37533749

37543750
<p>In all cases only one punctuation character may hang outside the edge of
3755-
the line.
3751+
the line. Furthermore, start and end borders or padding on an inline
3752+
element are never allowed to hang.
3753+
3754+
<p class=note>Note that if there is not sufficient padding on the block
3755+
container, hanging punctuation may trigger overflow.
37563756

3757-
<p class=issue>Need to work on the description. Cover indentation as well.
3758-
Check for Western use-cases. Add <code>hyphens</code> value?
3757+
<p class=issue>Check for Western use-cases. Add <code>hyphens</code> value?
37593758

37603759
<h2 id=decoration><span class=secno>11. </span> <a
37613760
name=text-decoration>Text Decoration</a></h2>
@@ -4815,30 +4814,28 @@ <h3 id=text-shadow><span class=secno>11.3. </span> Text Shadows: the
48154814
applied to the text of the element. <dfn
48164815
id=ltshadowgt>&lt;shadow&gt;</dfn> is the same as defined for the
48174816
&lsquo;<code class=property>box-shadow</code>&rsquo; property except that
4818-
the &lsquo;<code class=css>inset</code>&rsquo; keyword is not allowed.
4819-
4820-
<p class=issue>Should shadows be clipped to the glyph edges, like
4821-
&lsquo;<code class=property>box-shadow</code>&rsquo; is clipped to the box
4822-
edges, or should it be painted completely underneath the text. (This makes
4823-
a difference when the text is partially transparent.)
4824-
4825-
<p>The shadow is applied to all of the element's text as well as any text
4826-
decoration applied to it.
4827-
<!-- merge with above sentence once issue resolved --> <span
4828-
class=issue>Would it be better to apply shadows together with text
4829-
decoration: i.e. a descendant of an underlined element doesn't apply
4830-
shadow to its underline, but the underlining element, if it has shadows,
4831-
would apply it to the underline of all text it underlines.</span> When a
4832-
<a href="#text-outline">text outline</a> is specified, the shadow shadows
4833-
the outlined shape rather than the glyph shape.
4817+
the &lsquo;<code class=css>inset</code>&rsquo; keyword is not allowed. The
4818+
shadow is applied to all of the element's text as well as any text
4819+
decorations it specifies. When a <a href="#text-outline">text outline</a>
4820+
is specified, the shadow shadows the outlined shape rather than the glyph
4821+
shape.
48344822

48354823
<p>The shadow effects are applied front-to-back: the first shadow is on
48364824
top. The shadows may thus overlay each other, but they never overlay the
4837-
text itself. Shadow effects do not alter the size of a box, but may extend
4838-
beyond its boundaries. The shadow must be painted immediately behind the
4839-
element's text (in front of its background). UAs should avoid painting
4840-
text shadows over text in adjacent elements belonging to the same stack
4841-
level and stacking context.
4825+
text itself. The shadow must be painted at a stack level between the
4826+
element's border and/or background, if present, and the elements text and
4827+
text decoration. UAs should avoid painting text shadows over text in
4828+
adjacent elements belonging to the same stack level and stacking context.
4829+
(This may mean that the exact stack level of the shadows depends on
4830+
whether the element has a border or background: the exact stacking
4831+
behavior of text shadows is thus UA-defined.)
4832+
4833+
<p>Unlike &lsquo;<code class=property>box-shadow</code>&rsquo;, text
4834+
shadows are not clipped to the shadowed shape and may show through if the
4835+
text is partially-transparent. Like &lsquo;<code
4836+
class=property>box-shadow</code>&rsquo;, text shadows do not influence
4837+
layout, and do not trigger scrolling or increase the size of the
4838+
scrollable area.
48424839

48434840
<p class=note>The painting order of shadows defined here is the opposite of
48444841
that defined in the 1998 <a
@@ -4929,6 +4926,10 @@ <h3 id=text-outline><span class=secno>11.4. </span> Text Outlines: the
49294926
<p>Implementations may ignore the blur radius when text outline is combined
49304927
with a <a href="#text-shadow">text shadow</a>.
49314928

4929+
<p class=issue>The spread radius argument added to the &lsquo;<a
4930+
href="#text-shadow0"><code class=property>text-shadow</code></a>&rsquo;
4931+
property makes this property somewhat redundant. Should it be kept?
4932+
49324933
<h2 id=ui><span class=secno>12. </span>This section should move to CSS3 UI</h2>
49334934

49344935
<h3 id=text-overflow><span class=secno>12.1. </span><a
@@ -5214,7 +5215,7 @@ <h2 class=no-num id=appendix-b-property-index> Appendix B: Property index</h2>
52145215

52155216
<td>none
52165217

5217-
<td>block containers
5218+
<td>inline elements
52185219

52195220
<td>yes
52205221

css3-text/Overview.src.html

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3684,29 +3684,25 @@ <h3 id="text-shadow">
36843684
<p>This property accepts a comma-separated list of shadow effects to
36853685
be applied to the text of the element. <dfn>&lt;shadow&gt;</dfn>
36863686
is the same as defined for the 'box-shadow' property except that
3687-
the ''inset'' keyword is not allowed.
3688-
3689-
<p class="issue">Should shadows be clipped to the glyph edges, like
3690-
'box-shadow' is clipped to the box edges, or should it be painted
3691-
completely underneath the text. (This makes a difference when the
3692-
text is partially transparent.)</p>
3693-
3694-
<p>The shadow is applied to all of the element's
3695-
text as well as any text decoration applied to it. <!-- merge with above sentence once issue resolved -->
3696-
<span class="issue">Would it be better to apply shadows together with
3697-
text decoration: i.e. a descendant of an underlined element doesn't
3698-
apply shadow to its underline, but the underlining element, if it has
3699-
shadows, would apply it to the underline of all text it underlines.</span>
3687+
the ''inset'' keyword is not allowed. The shadow is applied to all
3688+
of the element's text as well as any text decorations it specifies.
37003689
When a <a href="#text-outline">text outline</a> is specified, the shadow
37013690
shadows the outlined shape rather than the glyph shape.</p>
37023691

37033692
<p>The shadow effects are applied front-to-back: the first shadow is on
37043693
top. The shadows may thus overlay each other, but they never overlay
3705-
the text itself. Shadow effects do not alter the size of a box, but
3706-
may extend beyond its boundaries. The shadow must be painted immediately
3707-
behind the element's text (in front of its background). UAs should avoid
3708-
painting text shadows over text in adjacent elements belonging to the
3709-
same stack level and stacking context.</p>
3694+
the text itself. The shadow must be painted at a stack level between
3695+
the element's border and/or background, if present, and the elements
3696+
text and text decoration. UAs should avoid painting text shadows over
3697+
text in adjacent elements belonging to the same stack level and stacking
3698+
context. (This may mean that the exact stack level of the shadows depends
3699+
on whether the element has a border or background: the exact stacking
3700+
behavior of text shadows is thus UA-defined.)</p>
3701+
3702+
<p>Unlike 'box-shadow', text shadows are not clipped to the shadowed
3703+
shape and may show through if the text is partially-transparent.
3704+
Like 'box-shadow', text shadows do not influence layout, and do not
3705+
trigger scrolling or increase the size of the scrollable area.
37103706

37113707
<p class="note">The painting order of shadows defined here is the opposite
37123708
of that defined in the 1998
@@ -3787,6 +3783,9 @@ <h3 id="text-outline">
37873783
<p>Implementations may ignore the blur radius when text outline is combined
37883784
with a <a href="#text-shadow">text shadow</a>.</p>
37893785

3786+
<p class="issue">The spread radius argument added to the 'text-shadow'
3787+
property makes this property somewhat redundant. Should it be kept?</p>
3788+
37903789
<h2 id="ui">This section should move to CSS3 UI</h2>
37913790
<h3 id="text-overflow"><a name="text-overflow-props"></a><a name="text-overflow-mode"></a><a name="text-overflow-ellipsis"></a><a name="ellipsis-def"></a>
37923791

0 commit comments

Comments
 (0)