Skip to content

Commit 4a149a6

Browse files
committed
Clarifications to letter-spacing and word-spacing
--HG-- extra : rebase_source : 85a8e59a7ec95c2f7f1944bd2238b9ff8c3eddbc
1 parent 1c2a62f commit 4a149a6

2 files changed

Lines changed: 78 additions & 80 deletions

File tree

css3-text/Overview.html

Lines changed: 41 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232

3333
<h1>CSS Text Level 3</h1>
3434

35-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 19 July 2012</h2>
35+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 31 July 2012</h2>
3636

3737
<dl>
3838
<dt>This version:
3939

4040
<dd><a href="http://dev.w3.org/csswg/css3-text/">$Date$ (CVS
4141
$Revision$)</a> <!--
42-
<dd><a href="http://www.w3.org/TR/2012/WD-css3-text-20120719/">http://www.w3.org/TR/2012/WD-css3-text-20120719/</a></dd>
42+
<dd><a href="http://www.w3.org/TR/2012/WD-css3-text-20120731/">http://www.w3.org/TR/2012/WD-css3-text-20120731/</a></dd>
4343
-->
4444

4545

@@ -1199,8 +1199,8 @@ <h3 id=line-break-details><span class=secno>5.1. </span> Line Breaking
11991199

12001200
<li>For <a href="#soft-wrap-opportunity"><i>soft wrap
12011201
opportunities</i></a> created by characters that disappear at the line
1202-
break (i.e. spaces), properties on the element containing that character
1203-
control the line breaking at that opportunity. For <a
1202+
break (e.g. U+0020 SPACE), properties on the element containing that
1203+
character control the line breaking at that opportunity. For <a
12041204
href="#soft-wrap-opportunity"><i>soft wrap opportunities</i></a> defined
12051205
by the boundary between two characters, the properties on the element
12061206
containing the boundary control breaking.
@@ -2571,15 +2571,15 @@ <h2 id=spacing><span class=secno>8. </span> Spacing</h2>
25712571
<pre>p { word-spacing: -50% 0%; }</pre>
25722572
</div>
25732573

2574-
<p id=spacing-limit>The <dfn
2575-
id=ltspacing-limitgt>&lt;spacing-limit&gt;</dfn> value type, which
2574+
<p id=spacing-limits>The <dfn
2575+
id=ltspacing-limitsgt>&lt;spacing-limits&gt;</dfn> value type, which
25762576
represents optimum, minimum, and maximum spacing in ‘<a
25772577
href="#word-spacing0"><code class=property>word-spacing</code></a>’ and
25782578
<a href="#letter-spacing0"><code
25792579
class=property>letter-spacing</code></a>’, is defined as
25802580

25812581
<pre class=prod><dfn
2582-
id=ltspacing-limit>&lt;spacing-limit></dfn> = [ normal | &lt;length&gt; | &lt;percentage&gt;]{1,3}</pre>
2582+
id=ltspacing-limits>&lt;spacing-limits></dfn> = [ normal | &lt;length&gt; | &lt;percentage&gt;]{1,3}</pre>
25832583

25842584
<p>If three values are specified, they represent the optimum, minimum, and
25852585
maximum in that order. If only two values are specified, then the first
@@ -2588,54 +2588,51 @@ <h2 id=spacing><span class=secno>8. </span> Spacing</h2>
25882588
minimum, and maximum. The values are interpreted as defined below:
25892589

25902590
<dl>
2591-
<dt><dfn id=normal3 title="&lt;spacing-limit&gt;:normal"><code
2591+
<dt><dfn id=normal3 title="&lt;spacing-limits&gt;:normal"><code
25922592
class=css>normal</code></dfn>
25932593

2594-
<dd>Specifies the normal optimum/minimum/maximum spacing, as defined by
2595-
the current font and/or the user agent. See <a
2596-
href="#normal-spacing">below</a>.
2594+
<dd>Specifies normal spacing as defined by the current font and/or the
2595+
user agent; see <a href="#normal-spacing">below</a>. A ‘<code
2596+
class=css>normal</code>’ optimum spacing value computes to zero.
25972597

25982598
<dt><dfn id=ltlengthgt
2599-
title="&lt;spacing-limit&gt;:&lt;length&gt;"><code
2599+
title="&lt;spacing-limits&gt;:&lt;length&gt;"><code
26002600
class=css>&lt;length&gt;</code></dfn>
26012601

2602-
<dd>Specifies extra spacing <em>in addition to</em> the normal optimum
2603-
spacing. Values may be negative, but there may be
2604-
implementation-dependent limits.
2602+
<dd>Specifies extra spacing <em>in addition to</em> the intrinsic
2603+
inter-character/inter-word spacing defined by the font. Values may be
2604+
negative, but there may be implementation-dependent limits.
26052605

26062606
<dt><dfn id=ltpercentagegt
2607-
title="&lt;spacing-limit&gt;:&lt;percentage&gt;"><code
2607+
title="&lt;spacing-limits&gt;:&lt;percentage&gt;"><code
26082608
class=css>&lt;percentage&gt;</code></dfn>
26092609

26102610
<dd>Specifies the additional spacing as a percentage of the affected
2611-
character. Only valid on ‘<a href="#word-spacing0"><code
2612-
class=property>word-spacing</code></a>’. Negative values are not
2613-
allowed.
2611+
character's <i>advance measure</i>. Only valid on ‘<a
2612+
href="#word-spacing0"><code class=property>word-spacing</code></a>’.
26142613
</dl>
26152614

26162615
<p>In the absence of justification the optimum spacing is be used. The text
26172616
justification process may alter the spacing from its optimum (see the <a
26182617
href="#text-justify"><code class=property>text-justify</code></a>
26192618
property, above) but must not violate the minimum spacing limit and should
2620-
also avoid exceeding the maximum.
2619+
also avoid exceeding the maximum. The UA may also use the difference
2620+
between the minimum/maximum limits and the optimum as input into a
2621+
weighting algorithm for justification.
26212622

26222623
<p>The minimum is treated as a hard constraint: if the maximum is less than
26232624
the minimum, then the used it is set to the minimum. Likewise for the
26242625
optimum. Similarly if the maximum is less than the optimum, then the used
26252626
optimum is set to the used maximum.
26262627

26272628
<p><dfn id=normal-spacing>Normal spacing</dfn>: Although ‘<code
2628-
class=css>normal</code>’ spacing is UA-defined, the normal minimum and
2629-
maximum must be defined relative to the optimum so that the minimum and
2630-
maximum limits increase and decrease with changes to the optimum spacing.
2631-
These limits may also vary according to some measure of the amount of text
2632-
on a line (e.g. block width divided by font size), as larger measures can
2633-
accommodate tighter spacing constraints. Normal optimum/minimum/maximum
2634-
spacing may also vary based on the value of the <a
2629+
class=css>normal</code>’ minimum and maximum spacing limits are
2630+
UA-defined, they must be defined relative to the optimum so that the
2631+
limits increase and decrease with changes to the optimum spacing. Normal
2632+
limits may also vary according to the value of the <a
26352633
href="#text-justify"><code class=property>text-justify</code></a>
2636-
property, the element's language, and other factors. Normal spacing
2637-
between a pair of <a href="#connected-scripts">connected</a> or <a
2638-
href="#cursive-scripts">cursive</a> characters is always zero.
2634+
property, the element's language, some measure of the amount of text on a
2635+
line (e.g. block width divided by font size), and/or other factors.
26392636

26402637
<h3 id=word-spacing><span class=secno>8.1. </span> Word Spacing: the ‘<a
26412638
href="#word-spacing0"><code class=property>word-spacing</code></a>
@@ -2651,7 +2648,7 @@ <h3 id=word-spacing><span class=secno>8.1. </span> Word Spacing: the ‘<a
26512648
<tr>
26522649
<th><a href="#values">Value</a>:
26532650

2654-
<td><a href="#spacing-limit">&lt;spacing-limit&gt;</a>
2651+
<td><a href="#spacing-limits">&lt;spacing-limits&gt;</a>
26552652

26562653
<tr>
26572654
<th>Initial:
@@ -2681,8 +2678,9 @@ <h3 id=word-spacing><span class=secno>8.1. </span> Word Spacing: the ‘<a
26812678
<tr>
26822679
<th>Computed value:
26832680

2684-
<td>as specified, except with &lt;length> values computed to absolute
2685-
lengths
2681+
<td>an optimum, minimum, and maximum value, each consisting of either an
2682+
absolute length, a percentage, or the keyword ‘<code
2683+
class=css>normal</code>
26862684
</table>
26872685

26882686
<p>This property specifies the minimum, maximum, and optimal spacing
@@ -2691,7 +2689,7 @@ <h3 id=word-spacing><span class=secno>8.1. </span> Word Spacing: the ‘<a
26912689
<p>Additional spacing is applied to each word-separator character left in
26922690
the text after the <a href="#white-space-rules">white space processing
26932691
rules</a> have been applied, and should be applied half on each side of
2694-
the character.
2692+
the character unless otherwise dictated by typographic tradition.
26952693

26962694
<div class=example>
26972695
<p>The following example will make all the spaces between words in Arabic
@@ -2732,7 +2730,7 @@ <h3 id=letter-spacing><span class=secno>8.2. </span> Tracking: the ‘<a
27322730
<tr>
27332731
<th><a href="#values">Value</a>:
27342732

2735-
<td><a href="#spacing-limit">&lt;spacing-limit&gt;</a>
2733+
<td><a href="#spacing-limits">&lt;spacing-limits&gt;</a>
27362734

27372735
<tr>
27382736
<th>Initial:
@@ -2762,14 +2760,14 @@ <h3 id=letter-spacing><span class=secno>8.2. </span> Tracking: the ‘<a
27622760
<tr>
27632761
<th>Computed value:
27642762

2765-
<td>as specified, except with &lt;length> values computed to absolute
2766-
lengths
2763+
<td>an optimum, minimum, and maximum value, each consisting of either an
2764+
absolute length, a percentage, or the keyword ‘<code
2765+
class=css>normal</code>
27672766
</table>
27682767

27692768
<p>This property specifies the minimum, maximum, and optimal spacing
27702769
between <a href="#character"><i>characters</i></a>. Letter-spacing is
2771-
applied in addition to any word-spacing. ‘<code
2772-
class=css>normal</code>’ optimum letter-spacing is typically zero.
2770+
applied in addition to any word-spacing.
27732771

27742772
<p>Letter-spacing must not be applied at the beginning or at the end of a
27752773
line. At element boundaries, the total letter spacing between two
@@ -2811,8 +2809,8 @@ <h3 id=letter-spacing><span class=secno>8.2. </span> Tracking: the ‘<a
28112809
class=property>letter-spacing</code></a>’ applied to
28122810
<code>A&amp;zwsp;B</code> is identical to <code>AB</code>.
28132811

2814-
<p>When the resulting space between two characters is not the same as the
2815-
default space, user agents should not use optional ligatures.
2812+
<p>When the effective letter-spacing between two characters is not zero,
2813+
user agents should not apply optional ligatures.
28162814

28172815
<h2 id=edge-effects><span class=secno>9. </span> Edge Effects</h2>
28182816

@@ -5228,7 +5226,7 @@ <h2 class=no-num id=appendix-h-full-property-index>Appendix H: Full
52285226
<tr>
52295227
<th><a class=property href="#letter-spacing0">letter-spacing</a>
52305228

5231-
<td>&lt;spacing-limit&gt;
5229+
<td>&lt;spacing-limits&gt;
52325230

52335231
<td>normal
52345232

@@ -5571,7 +5569,7 @@ <h2 class=no-num id=appendix-h-full-property-index>Appendix H: Full
55715569
<tr>
55725570
<th><a class=property href="#word-spacing0">word-spacing</a>
55735571

5574-
<td>&lt;spacing-limit&gt;
5572+
<td>&lt;spacing-limits&gt;
55755573

55765574
<td>normal
55775575

css3-text/Overview.src.html

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ <h3 id="line-break-details">
791791
or <i>soft wrap opportunity</i> in the flow.
792792
<li>The line breaking behavior of a replaced element
793793
is equivalent to that of the Object Replacement Character (U+FFFC).
794-
<li>For <i>soft wrap opportunities</i> created by characters that disappear at the line break (i.e. spaces),
794+
<li>For <i>soft wrap opportunities</i> created by characters that disappear at the line break (e.g. U+0020 SPACE),
795795
properties on the element containing that character control the line breaking at that opportunity.
796796
For <i>soft wrap opportunities</i> defined by the boundary between two characters,
797797
the properties on the element containing the boundary control breaking.
@@ -1889,10 +1889,10 @@ <h2 id="spacing">
18891889
<pre>p { word-spacing: -50% 0%; }</pre>
18901890
</div>
18911891

1892-
<p id="spacing-limit">The <dfn>&lt;spacing-limit&gt;</dfn> value type,
1892+
<p id="spacing-limits">The <dfn>&lt;spacing-limits&gt;</dfn> value type,
18931893
which represents optimum, minimum, and maximum spacing in 'word-spacing'
18941894
and 'letter-spacing', is defined as
1895-
<pre class="prod"><dfn>&lt;spacing-limit></dfn> = [ normal | &lt;length&gt; | &lt;percentage&gt;]{1,3}</pre>
1895+
<pre class="prod"><dfn>&lt;spacing-limits></dfn> = [ normal | &lt;length&gt; | &lt;percentage&gt;]{1,3}</pre>
18961896

18971897
<p>If three values are specified, they represent the optimum, minimum,
18981898
and maximum in that order.
@@ -1902,20 +1902,21 @@ <h2 id="spacing">
19021902
minimum, and maximum. The values are interpreted as defined below:
19031903

19041904
<dl>
1905-
<dt><dfn title="&lt;spacing-limit&gt;:normal">''normal''</dfn></dt>
1906-
<dd>Specifies the normal optimum/minimum/maximum spacing, as defined
1907-
by the current font and/or the user agent. See <a href="#normal-spacing">below</a>.
1905+
<dt><dfn title="&lt;spacing-limits&gt;:normal">''normal''</dfn></dt>
1906+
<dd>Specifies normal spacing
1907+
as defined by the current font and/or the user agent;
1908+
see <a href="#normal-spacing">below</a>.
1909+
A ''normal'' optimum spacing value computes to zero.
19081910
</dd>
1909-
<dt><dfn title="&lt;spacing-limit&gt;:&lt;length&gt;">''&lt;length&gt;''</dfn>
1910-
<dd>Specifies extra spacing <em>in addition to</em> the normal optimum
1911-
spacing.
1912-
Values may be negative, but there may be implementation-dependent
1913-
limits.
1911+
<dt><dfn title="&lt;spacing-limits&gt;:&lt;length&gt;">''&lt;length&gt;''</dfn>
1912+
<dd>Specifies extra spacing <em>in addition to</em>
1913+
the intrinsic inter-character/inter-word spacing defined by the font.
1914+
Values may be negative, but there may be implementation-dependent limits.
19141915
</dd>
1915-
<dt><dfn title="&lt;spacing-limit&gt;:&lt;percentage&gt;">''&lt;percentage&gt;''</dfn>
1916+
<dt><dfn title="&lt;spacing-limits&gt;:&lt;percentage&gt;">''&lt;percentage&gt;''</dfn>
19161917
<dd>Specifies the additional spacing as a percentage of the affected
1917-
character.
1918-
Only valid on 'word-spacing'. Negative values are not allowed.
1918+
character's <i>advance measure</i>.
1919+
Only valid on 'word-spacing'.
19191920
</dd>
19201921
</dl>
19211922

@@ -1924,26 +1925,23 @@ <h2 id="spacing">
19241925
from its optimum (see the <a href="#text-justify">'text-justify'</a>
19251926
property, above) but must not violate the minimum spacing limit
19261927
and should also avoid exceeding the maximum.
1928+
The UA may also use the difference between the minimum/maximum limits
1929+
and the optimum as input into a weighting algorithm for justification.
19271930

19281931
<p>The minimum is treated as a hard constraint: if the maximum is less
19291932
than the minimum, then the used it is set to the minimum. Likewise
19301933
for the optimum. Similarly if the maximum is less than the optimum,
19311934
then the used optimum is set to the used maximum.
19321935

19331936
<p><dfn id="normal-spacing">Normal spacing</dfn>:
1934-
Although ''normal'' spacing is UA-defined, the normal minimum and
1935-
maximum must be defined relative to the optimum so that the minimum
1936-
and maximum limits increase and decrease with changes to the optimum spacing.
1937-
These limits may also vary according to some measure of the amount
1938-
of text on a line (e.g. block width divided by font size), as
1939-
larger measures can accommodate tighter spacing constraints.
1940-
Normal optimum/minimum/maximum spacing may also vary based on the
1941-
value of the <a href="#text-justify">'text-justify'</a> property,
1942-
the element's language, and other factors.
1943-
Normal spacing between a pair of
1944-
<a href="#connected-scripts">connected</a> or
1945-
<a href="#cursive-scripts">cursive</a>
1946-
characters is always zero.
1937+
Although ''normal'' minimum and maximum spacing limits are UA-defined,
1938+
they must be defined relative to the optimum so that the limits
1939+
increase and decrease with changes to the optimum spacing.
1940+
Normal limits may also vary according to
1941+
the value of the <a href="#text-justify">'text-justify'</a> property,
1942+
the element's language,
1943+
some measure of the amount of text on a line (e.g. block width divided by font size),
1944+
and/or other factors.
19471945

19481946
<h3 id="word-spacing">
19491947
Word Spacing: the 'word-spacing' property</h3>
@@ -1956,7 +1954,7 @@ <h3 id="word-spacing">
19561954
</tr>
19571955
<tr>
19581956
<th><a href="#values">Value</a>:
1959-
<td><a href="#spacing-limit">&lt;spacing-limit&gt;</a>
1957+
<td><a href="#spacing-limits">&lt;spacing-limits&gt;</a>
19601958
</td>
19611959
</tr>
19621960
<tr>
@@ -1981,7 +1979,8 @@ <h3 id="word-spacing">
19811979
</tr>
19821980
<tr>
19831981
<th>Computed&#160;value:</th>
1984-
<td>as specified, except with &lt;length> values computed to absolute lengths</td>
1982+
<td>an optimum, minimum, and maximum value,
1983+
each consisting of either an absolute length, a percentage, or the keyword ''normal''
19851984
</tr>
19861985
</tbody>
19871986
</table>
@@ -1992,7 +1991,8 @@ <h3 id="word-spacing">
19921991
<p>Additional spacing is applied to each word-separator character
19931992
left in the text after the <a href="#white-space-rules">white space
19941993
processing rules</a> have been applied, and should be applied half on
1995-
each side of the character.
1994+
each side of the character
1995+
unless otherwise dictated by typographic tradition.
19961996

19971997
<div class="example">
19981998
<p>The following example will make all the spaces between words in Arabic
@@ -2030,7 +2030,7 @@ <h3 id="letter-spacing">
20302030
</tr>
20312031
<tr>
20322032
<th><a href="#values">Value</a>:
2033-
<td><a href="#spacing-limit">&lt;spacing-limit&gt;</a>
2033+
<td><a href="#spacing-limits">&lt;spacing-limits&gt;</a>
20342034
</td>
20352035
</tr>
20362036
<tr>
@@ -2055,15 +2055,15 @@ <h3 id="letter-spacing">
20552055
</tr>
20562056
<tr>
20572057
<th>Computed&#160;value:</th>
2058-
<td>as specified, except with &lt;length> values computed to absolute lengths
2058+
<td>an optimum, minimum, and maximum value,
2059+
each consisting of either an absolute length, a percentage, or the keyword ''normal''
20592060
</tr>
20602061
</tbody>
20612062
</table>
20622063

20632064
<p>This property specifies the minimum, maximum, and optimal spacing
2064-
between <i>characters</i>. Letter-spacing is applied in
2065-
addition to any word-spacing. ''normal'' optimum letter-spacing is
2066-
typically zero.</p>
2065+
between <i>characters</i>.
2066+
Letter-spacing is applied in addition to any word-spacing.
20672067

20682068
<p>Letter-spacing must not be applied at the beginning or at the end
20692069
of a line. At element boundaries, the total letter spacing between
@@ -2104,8 +2104,8 @@ <h3 id="letter-spacing">
21042104
Unicode Cf category). For example, 'letter-spacing' applied to
21052105
<code>A&amp;zwsp;B</code> is identical to <code>AB</code>.
21062106

2107-
<p>When the resulting space between two characters is not the same as the
2108-
default space, user agents should not use optional ligatures.</p>
2107+
<p>When the effective letter-spacing between two characters is not zero,
2108+
user agents should not apply optional ligatures.</p>
21092109

21102110
<h2 id="edge-effects">
21112111
Edge Effects</h2>

0 commit comments

Comments
 (0)