Skip to content

Commit e5b677a

Browse files
committed
Shuffle around some letter-spacing/word-spacing text.
1 parent 3e695b8 commit e5b677a

2 files changed

Lines changed: 112 additions & 71 deletions

File tree

css3-text/Overview.html

Lines changed: 61 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929

3030
<h1>CSS Text Level 3</h1>
3131

32-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 3 January 2012</h2>
32+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 5 January 2012</h2>
3333

3434
<dl>
3535
<dt>This version:
3636

37-
<dd><a href="http://dev.w3.org/csswg/css3-text/">$Date: 2011/11/23
38-
10:55:51 $ (CVS $Revision$)</a> <!--
39-
<dd><a href="http://www.w3.org/TR/2012/WD-css3-text-20120103/">http://www.w3.org/TR/2012/WD-css3-text-20120103/</a></dd>
37+
<dd><a href="http://dev.w3.org/csswg/css3-text/">$Date: 2012/01/03
38+
18:35:25 $ (CVS $Revision$)</a> <!--
39+
<dd><a href="http://www.w3.org/TR/2012/WD-css3-text-20120105/">http://www.w3.org/TR/2012/WD-css3-text-20120105/</a></dd>
4040
-->
4141

4242

@@ -2512,20 +2512,36 @@ <h3 id=text-justify><span class=secno>7.3. </span> Justification Method:
25122512

25132513
<h2 id=spacing><span class=secno>8. </span> Spacing</h2>
25142514

2515+
<p>CSS offers control over text spacing via the &lsquo;<a
2516+
href="#word-spacing0"><code class=property>word-spacing</code></a>&rsquo;
2517+
and &lsquo;<a href="#letter-spacing0"><code
2518+
class=property>letter-spacing</code></a>&rsquo; properties. While in CSS1
2519+
and CSS2 these could only be &lsquo;<code class=css>normal</code>&rsquo;
2520+
(justifiable) or a fixed length, CSS3 can indicate range constraints to
2521+
control flexibility in justification. In addition the &lsquo;<a
2522+
href="#word-spacing0"><code class=property>word-spacing</code></a>&rsquo;
2523+
property can now be specified in percentages, making it possible to, for
2524+
example, double or eliminate word spacing.
2525+
2526+
<div class=example>
2527+
<p>In the following example, word spacing is halved, but may expand up to
2528+
its full amount if needed for text justification.
2529+
2530+
<pre>p { word-spacing: 50% 100%; }</pre>
2531+
</div>
2532+
25152533
<p id=spacing-limit>The <dfn
2516-
id=ltspacing-limitgt>&lt;spacing-limit&gt;</dfn> value type, which is to
2517-
represent an optimum, minimum, and maximum for &lsquo;<a
2534+
id=ltspacing-limitgt>&lt;spacing-limit&gt;</dfn> value type, which
2535+
represents optimum, minimum, and maximum spacing in &lsquo;<a
25182536
href="#word-spacing0"><code class=property>word-spacing</code></a>&rsquo;
25192537
and &lsquo;<a href="#letter-spacing0"><code
25202538
class=property>letter-spacing</code></a>&rsquo;, is defined as
25212539

25222540
<pre class=prod><dfn
2523-
id=ltspacing-limit>&lt;spacing-limit></dfn> = [ normal | &lt;length&gt; | &lt;percentage&gt;]{1,3}
2524-
2525-
</pre>
2541+
id=ltspacing-limit>&lt;spacing-limit></dfn> = [ normal | &lt;length&gt; | &lt;percentage&gt;]{1,3}</pre>
25262542

25272543
<p>If three values are specified, they represent the optimum, minimum, and
2528-
maximum respectively. If only two values are specified, then the first
2544+
maximum in that order. If only two values are specified, then the first
25292545
represents both the optimum and the minimum, and the second represents the
25302546
maximum. If just one value is specified, then it represents the optimum,
25312547
minimum, and maximum. The values are interpreted as defined below:
@@ -2535,18 +2551,8 @@ <h2 id=spacing><span class=secno>8. </span> Spacing</h2>
25352551
class=css>normal</code>&rsquo;</dfn>
25362552

25372553
<dd>Specifies the normal optimum/minimum/maximum spacing, as defined by
2538-
the current font and/or the user agent. Normal minimum and maximum
2539-
spacing must be defined relative to the optimum spacing so that the
2540-
minimum and maximum limits increase and decrease with changes to the
2541-
optimum spacing. These limits may also vary according to some measure of
2542-
the amount of text on a line (e.g. block width divided by font size), as
2543-
larger measures can accommodate tighter spacing constraints. Normal
2544-
optimum/minimum/maximum spacing may also vary based on the value of the
2545-
<a href="#text-justify">&lsquo;<code
2546-
class=property>text-justify</code>&rsquo;</a> property, the element's
2547-
language, and other factors. Normal spacing between a pair of <a
2548-
href="#connected-scripts">connected</a> or <a
2549-
href="#cursive-scripts">cursive</a> characters is always zero.
2554+
the current font and/or the user agent. See <a
2555+
href="#normal-spacing">below</a>.
25502556

25512557
<dt><dfn id=ltlengthgt
25522558
title="&lt;spacing-limit&gt;:&lt;length&gt;">&lsquo;<code
@@ -2566,16 +2572,31 @@ <h2 id=spacing><span class=secno>8. </span> Spacing</h2>
25662572
allowed.
25672573
</dl>
25682574

2569-
<p>In the absence of justification the optimum spacing must be used. The
2570-
text justification process may alter the spacing from its optimum (see the
2571-
<a href="#text-justify">&lsquo;<code
2575+
<p>In the absence of justification the optimum spacing is be used. The text
2576+
justification process may alter the spacing from its optimum (see the <a
2577+
href="#text-justify">&lsquo;<code
25722578
class=property>text-justify</code>&rsquo;</a> property, above) but must
25732579
not violate the minimum spacing limit and should also avoid exceeding the
25742580
maximum.
25752581

2576-
<p>If the minimum is more than the maxmimum, then the used maximum is set
2577-
to the minimum. Likewise for the optimum. If the maximum is less than the
2578-
optimum, then the used optimum is set to the used maximum.
2582+
<p>The minimum is treated as a hard constraint: if the maximum is less than
2583+
the minimum, then the used it is set to the minimum. Likewise for the
2584+
optimum. Similarly if the maximum is less than the optimum, then the used
2585+
optimum is set to the used maximum.
2586+
2587+
<p><dfn id=normal-spacing>Normal spacing</dfn>: Although &lsquo;<code
2588+
class=css>normal</code>&rsquo; spacing is UA-defined, the normal minimum
2589+
and maximum must be defined relative to the optimum so that the minimum
2590+
and maximum limits increase and decrease with changes to the optimum
2591+
spacing. These limits may also vary according to some measure of the
2592+
amount of text on a line (e.g. block width divided by font size), as
2593+
larger measures can accommodate tighter spacing constraints. Normal
2594+
optimum/minimum/maximum spacing may also vary based on the value of the <a
2595+
href="#text-justify">&lsquo;<code
2596+
class=property>text-justify</code>&rsquo;</a> property, the element's
2597+
language, and other factors. Normal spacing between a pair of <a
2598+
href="#connected-scripts">connected</a> or <a
2599+
href="#cursive-scripts">cursive</a> characters is always zero.
25792600

25802601
<h3 id=word-spacing><span class=secno>8.1. </span> Word Spacing: the
25812602
&lsquo;<a href="#word-spacing0"><code
@@ -2626,20 +2647,12 @@ <h3 id=word-spacing><span class=secno>8.1. </span> Word Spacing: the
26262647
</table>
26272648

26282649
<p>This property specifies the minimum, maximum, and optimal spacing
2629-
between &ldquo;words&rdquo;, as follows:
2650+
between &ldquo;words&rdquo;.
26302651

26312652
<p>Spacing is applied to each word-separator character left in the text
26322653
after the <a href="#white-space-rules">white space processing rules</a>
26332654
have been applied, and should be applied half on each side of the
2634-
character. <dfn id=word-separator>Word-separator characters</dfn> include
2635-
the space (U+0020), the no-break space (U+00A0), the Ethiopic word space
2636-
(U+1361), the Aegean word separators (U+10100,U+10101), the Ugaritic word
2637-
divider (U+1039F), and the Tibetan tsek (U+0F0B, U+0F0C). If there are no
2638-
word-separator characters, or if the word-separating character has a zero
2639-
advance width (such as the zero width space U+200B) then the user agent
2640-
must not create an additional spacing between words. General punctuation
2641-
and fixed-width spaces (such as U+3000 and U+2000 through U+200A) are not
2642-
considered word-separator characters.
2655+
character.
26432656

26442657
<div class=example>
26452658
<p>The following example will make all the spaces between words in Arabic
@@ -2655,6 +2668,16 @@ <h3 id=word-spacing><span class=secno>8.1. </span> Word Spacing: the
26552668
<pre>p { word-spacing: 0.5ch; }</pre>
26562669
</div>
26572670

2671+
<p><dfn id=word-separator>Word-separator characters</dfn> include the space
2672+
(U+0020), the no-break space (U+00A0), the Ethiopic word space (U+1361),
2673+
the Aegean word separators (U+10100,U+10101), the Ugaritic word divider
2674+
(U+1039F), and the Tibetan tsek (U+0F0B, U+0F0C). If there are no
2675+
word-separator characters, or if the word-separating character has a zero
2676+
advance width (such as the zero width space U+200B) then the user agent
2677+
must not create an additional spacing between words. General punctuation
2678+
and fixed-width spaces (such as U+3000 and U+2000 through U+200A) are not
2679+
considered word-separator characters.
2680+
26582681
<h3 id=letter-spacing><span class=secno>8.2. </span> Tracking: the
26592682
&lsquo;<a href="#letter-spacing0"><code
26602683
class=property>letter-spacing</code></a>&rsquo; property</h3>

css3-text/Overview.src.html

Lines changed: 51 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,13 +1822,27 @@ <h3 id="text-justify">
18221822
<h2 id="spacing">
18231823
Spacing</h2>
18241824

1825+
<p>CSS offers control over text spacing via the 'word-spacing'
1826+
and 'letter-spacing' properties. While in CSS1 and CSS2 these could only
1827+
be ''normal'' (justifiable) or a fixed length, CSS3 can indicate range
1828+
constraints to control flexibility in justification.
1829+
In addition the 'word-spacing' property can now be specified in
1830+
percentages, making it possible to, for example, double or eliminate
1831+
word spacing.
1832+
1833+
<div class="example">
1834+
<p>In the following example, word spacing is halved, but may expand up
1835+
to its full amount if needed for text justification.
1836+
<pre>p { word-spacing: 50% 100%; }</pre>
1837+
</div>
1838+
18251839
<p id="spacing-limit">The <dfn>&lt;spacing-limit&gt;</dfn> value type,
1826-
which is to represent an optimum, minimum, and maximum for 'word-spacing'
1840+
which represents optimum, minimum, and maximum spacing in 'word-spacing'
18271841
and 'letter-spacing', is defined as
1828-
<pre class="prod"><dfn>&lt;spacing-limit></dfn> = [ normal | &lt;length&gt; | &lt;percentage&gt;]{1,3}
1842+
<pre class="prod"><dfn>&lt;spacing-limit></dfn> = [ normal | &lt;length&gt; | &lt;percentage&gt;]{1,3}</pre>
18291843

18301844
<p>If three values are specified, they represent the optimum, minimum,
1831-
and maximum respectively.
1845+
and maximum in that order.
18321846
If only two values are specified, then the first represents both the
18331847
optimum and the minimum, and the second represents the maximum.
18341848
If just one value is specified, then it represents the optimum,
@@ -1837,20 +1851,7 @@ <h2 id="spacing">
18371851
<dl>
18381852
<dt><dfn title="&lt;spacing-limit&gt;:normal">''normal''</dfn></dt>
18391853
<dd>Specifies the normal optimum/minimum/maximum spacing, as defined
1840-
by the current font and/or the user agent.
1841-
Normal minimum and maximum spacing must be defined relative to
1842-
the optimum spacing so that the minimum and maximum limits
1843-
increase and decrease with changes to the optimum spacing.
1844-
These limits may also vary according to some measure of the amount
1845-
of text on a line (e.g. block width divided by font size), as
1846-
larger measures can accommodate tighter spacing constraints.
1847-
Normal optimum/minimum/maximum spacing may also vary based on the
1848-
value of the <a href="#text-justify">'text-justify'</a> property,
1849-
the element's language, and other factors.
1850-
Normal spacing between a pair of
1851-
<a href="#connected-scripts">connected</a> or
1852-
<a href="#cursive-scripts">cursive</a>
1853-
characters is always zero.
1854+
by the current font and/or the user agent. See <a href="#normal-spacing">below</a>.
18541855
</dd>
18551856
<dt><dfn title="&lt;spacing-limit&gt;:&lt;length&gt;">''&lt;length&gt;''</dfn>
18561857
<dd>Specifies extra spacing <em>in addition to</em> the normal spacing.
@@ -1863,15 +1864,31 @@ <h2 id="spacing">
18631864
</dd>
18641865
</dl>
18651866

1866-
<p>In the absence of justification the optimum spacing must be used.
1867+
<p>In the absence of justification the optimum spacing is be used.
18671868
The text justification process may alter the spacing
18681869
from its optimum (see the <a href="#text-justify">'text-justify'</a>
18691870
property, above) but must not violate the minimum spacing limit
18701871
and should also avoid exceeding the maximum.
18711872

1872-
<p>If the minimum is more than the maxmimum, then the used maximum is
1873-
set to the minimum. Likewise for the optimum. If the maximum is less
1874-
than the optimum, then the used optimum is set to the used maximum.
1873+
<p>The minimum is treated as a hard constraint: if the maximum is less
1874+
than the minimum, then the used it is set to the minimum. Likewise
1875+
for the optimum. Similarly if the maximum is less than the optimum,
1876+
then the used optimum is set to the used maximum.
1877+
1878+
<p><dfn id="normal-spacing">Normal spacing</dfn>:
1879+
Although ''normal'' spacing is UA-defined, the normal minimum and
1880+
maximum must be defined relative to the optimum so that the minimum
1881+
and maximum limits increase and decrease with changes to the optimum spacing.
1882+
These limits may also vary according to some measure of the amount
1883+
of text on a line (e.g. block width divided by font size), as
1884+
larger measures can accommodate tighter spacing constraints.
1885+
Normal optimum/minimum/maximum spacing may also vary based on the
1886+
value of the <a href="#text-justify">'text-justify'</a> property,
1887+
the element's language, and other factors.
1888+
Normal spacing between a pair of
1889+
<a href="#connected-scripts">connected</a> or
1890+
<a href="#cursive-scripts">cursive</a>
1891+
characters is always zero.
18751892

18761893
<h3 id="word-spacing">
18771894
Word Spacing: the 'word-spacing' property</h3>
@@ -1915,23 +1932,12 @@ <h3 id="word-spacing">
19151932
</table>
19161933

19171934
<p>This property specifies the minimum, maximum, and optimal spacing
1918-
between &ldquo;words&rdquo;, as follows:
1935+
between &ldquo;words&rdquo;.
19191936

19201937
<p>Spacing is applied to each word-separator character
19211938
left in the text after the <a href="#white-space-rules">white space
19221939
processing rules</a> have been applied, and should be applied half on
19231940
each side of the character.
1924-
<dfn id="word-separator">Word-separator characters</dfn> include the
1925-
space (U+0020), the no-break space (U+00A0), the Ethiopic word space (U+1361),
1926-
the Aegean word separators (U+10100,U+10101), the Ugaritic word divider
1927-
(U+1039F), and the Tibetan tsek (U+0F0B, U+0F0C).
1928-
1929-
If there are no word-separator characters, or if the word-separating
1930-
character has a zero advance width (such as the zero width space U+200B)
1931-
then the user agent must not create an additional spacing between words.
1932-
1933-
General punctuation and fixed-width spaces (such as U+3000 and U+2000
1934-
through U+200A) are not considered word-separator characters.</p>
19351941

19361942
<div class="example">
19371943
<p>The following example will make all the spaces between words in Arabic
@@ -1945,6 +1951,18 @@ <h3 id="word-spacing">
19451951
<pre>p { word-spacing: 0.5ch; }</pre>
19461952
</div>
19471953

1954+
<p><dfn id="word-separator">Word-separator characters</dfn> include the
1955+
space (U+0020), the no-break space (U+00A0), the Ethiopic word space (U+1361),
1956+
the Aegean word separators (U+10100,U+10101), the Ugaritic word divider
1957+
(U+1039F), and the Tibetan tsek (U+0F0B, U+0F0C).
1958+
1959+
If there are no word-separator characters, or if the word-separating
1960+
character has a zero advance width (such as the zero width space U+200B)
1961+
then the user agent must not create an additional spacing between words.
1962+
1963+
General punctuation and fixed-width spaces (such as U+3000 and U+2000
1964+
through U+200A) are not considered word-separator characters.</p>
1965+
19481966
<h3 id="letter-spacing">
19491967
Tracking: the 'letter-spacing' property</h3>
19501968

0 commit comments

Comments
 (0)