Skip to content

Commit ff45977

Browse files
committed
[css-text] Editorial tweaks to text-transform (mostly markup), plus clarify order of operations and put white-space collapsing first
1 parent b88e0ca commit ff45977

File tree

3 files changed

+60
-64
lines changed

3 files changed

+60
-64
lines changed

css-module/Overview.src.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ <h3 id="values">
141141
definition conventions</a> from [[!CSS21]]. Value types not defined in
142142
this specification are defined in CSS Level 2 Revision 1 [[!CSS21]].
143143
Other CSS modules may expand the definitions of these value types: for
144-
example [[CSS3COLOR]], when combined with this module, expands the
145-
definition of the &lt;color&gt; value type as used in this specification.</p>
144+
example [[CSS3VAL]], when combined with this module, expands the
145+
definition of the <var>&lt;length&gt;</var> value type as used in this specification.</p>
146146

147147
<p>In addition to the property-specific values listed in their definitions,
148148
all properties defined in this specification also accept the

css-text/Overview.html

+33-39
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,9 @@ <h3 id=values><span class=secno>1.2. </span> Values</h3>
415415
this specification are defined in CSS Level 2 Revision 1 <a
416416
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. Other CSS
417417
modules may expand the definitions of these value types: for example <a
418-
href="#CSS3COLOR" rel=biblioentry>[CSS3COLOR]<!--{{CSS3COLOR}}--></a>,
419-
when combined with this module, expands the definition of the
420-
&lt;color&gt; value type as used in this specification.
418+
href="#CSS3VAL" rel=biblioentry>[CSS3VAL]<!--{{CSS3VAL}}--></a>, when
419+
combined with this module, expands the definition of the
420+
<var>&lt;length&gt;</var> value type as used in this specification.
421421

422422
<p>In addition to the property-specific values listed in their definitions,
423423
all properties defined in this specification also accept the <a
@@ -569,6 +569,21 @@ <h3 id=text-transform><span class=secno>2.1. </span> <a name=caps-prop></a>
569569
-->
570570
</dl>
571571

572+
<p>The definition of “word“ used for ‘<code
573+
class=css>capitalize</code>’ is UA-dependent; <a href="#UAX29"
574+
rel=biblioentry>[UAX29]<!--{{!UAX29}}--></a> is suggested (but not
575+
required) for determining such word boundaries. Authors should not expect
576+
<code class=css>capitalize</code>’ to follow language-specific
577+
titlecasing conventions (such as skipping articles in English).
578+
579+
<div class=example>
580+
<p>The following example converts the ASCII characters used in
581+
abbreviations in Japanese text to their fullwidth variants so that they
582+
lay out and line break like ideographs:
583+
584+
<pre>abbr:lang(ja) { text-transform: full-width; }</pre>
585+
</div>
586+
572587
<p>The case mapping rules for the character repertoire specified by the
573588
Unicode Standard can be found on the Unicode Consortium Web site <a
574589
href="#UNICODE" rel=biblioentry>[UNICODE]<!--{{!UNICODE}}--></a>. The UA
@@ -604,37 +619,23 @@ <h3 id=text-transform><span class=secno>2.1. </span> <a name=caps-prop></a>
604619
</div>
605620
-->
606621

607-
<p>The definition of "word" used for ‘<code
608-
class=css>capitalize</code>’ is UA-dependent; <a href="#UAX29"
609-
rel=biblioentry>[UAX29]<!--{{!UAX29}}--></a> is suggested (but not
610-
required) for determining such word boundaries. Authors should not expect
611-
<code class=css>capitalize</code>’ to follow language-specific
612-
titlecasing conventions (such as skipping articles in English).
613-
614622
<p>The definition of fullwidth and halfwidth forms can be found on the
615623
Unicode consortium web site at <a href="#UAX11"
616624
rel=biblioentry>[UAX11]<!--{{!UAX11}}--></a>. The mapping to fullwidth
617-
form is defined by taking code points with the &lt;wide&gt; or the
618-
&lt;narrow&gt; tag in their Decomposition_Mapping in <a href="#UAX44"
619-
rel=biblioentry>[UAX44]<!--{{!UAX44}}--></a>. For the &lt;narrow&gt; tag,
620-
the mapping is from the code point to the decomposition (minus
621-
&lt;narrow&gt; tag), and for the &lt;wide&gt; tag, the mapping is from the
622-
decomposition (minus the &lt;wide&gt; tag) back to the original code
623-
point.
625+
form is defined by taking code points with the <code>&lt;wide&gt;</code>
626+
or the <code>&lt;narrow&gt;</code> tag in their
627+
<code>Decomposition_Mapping</code> in <a href="#UAX44"
628+
rel=biblioentry>[UAX44]<!--{{!UAX44}}--></a>. For the
629+
<code>&lt;narrow&gt;</code> tag, the mapping is from the code point to the
630+
decomposition (minus <code>&lt;narrow&gt;</code> tag), and for the
631+
<code>&lt;wide&gt;</code> tag, the mapping is from the decomposition
632+
(minus the <code>&lt;wide&gt;</code> tag) back to the original code point.
624633

625634
<p>Text transformation happens after <a href="#white-space-rules">white
626635
space processing</a>, which means that ‘<code
627636
class=css>full-width</code>’ transforms only preserved U+0020 spaces to
628637
U+3000.
629638

630-
<div class=example>
631-
<p>The following example converts the ASCII characters in abbreviations in
632-
Japanese to their fullwidth variants so that they lay out and line break
633-
like ideographs:
634-
635-
<pre>abbr:lang(ja) { text-transform: full-width; }</pre>
636-
</div>
637-
638639
<p class=note> A future level of CSS may introduce the ability to create
639640
custom mapping tables for less common text transforms, such as by an
640641
<code class=css>@text-transform</code>’ rule similar to ‘<code
@@ -3467,15 +3468,6 @@ <h3 class=no-num id=informative-ref>Informative references</h3>
34673468
</dd>
34683469
<!---->
34693470

3470-
<dt id=CSS3COLOR>[CSS3COLOR]
3471-
3472-
<dd>Tantek Çelik; Chris Lilley; L. David Baron. <a
3473-
href="http://www.w3.org/TR/2011/REC-css3-color-20110607"><cite>CSS Color
3474-
Module Level 3.</cite></a> 7 June 2011. W3C Recommendation. URL: <a
3475-
href="http://www.w3.org/TR/2011/REC-css3-color-20110607">http://www.w3.org/TR/2011/REC-css3-color-20110607</a>
3476-
</dd>
3477-
<!---->
3478-
34793471
<dt id=CSS3VAL>[CSS3VAL]
34803472

34813473
<dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
@@ -3703,14 +3695,14 @@ <h2 class=no-num id=appendix-f-text-processing-order-of-oper>Appendix F:
37033695
layout is the same.)
37043696

37053697
<ol>
3698+
<li><a href="#white-space-rules">white space processing</a> part I
3699+
(pre-wrapping)
3700+
37063701
<li><a
37073702
href="http://www.w3.org/TR/css3-writing-modes/#text-combine-horizontal">text
37083703
combination</a> <a href="#CSS3-WRITING-MODES"
37093704
rel=biblioentry>[CSS3-WRITING-MODES]<!--{{!CSS3-WRITING-MODES}}--></a>
37103705

3711-
<li><a href="#white-space-rules">white space processing</a> part I
3712-
(pre-wrapping)
3713-
37143706
<li><a href="#text-transform">text transformation</a>
37153707

37163708
<li><a href="#wrapping">text wrapping</a> while applying per line:
@@ -3731,10 +3723,12 @@ <h2 class=no-num id=appendix-f-text-processing-order-of-oper>Appendix F:
37313723
orientation</a> <a href="#CSS3-WRITING-MODES"
37323724
rel=biblioentry>[CSS3-WRITING-MODES]<!--{{!CSS3-WRITING-MODES}}--></a>
37333725

3734-
<li><a href="#spacing">default spacing</a>
3726+
<li><a href="#letter-spacing0"><code
3727+
class=property>letter-spacing</code></a>’ and ‘<a
3728+
href="#word-spacing0"><code class=property>word-spacing</code></a>
37353729

37363730
<li><a href="http://www.w3.org/TR/css3-fonts/">font/glyph selection and
3737-
kerning</a> <a href="#CSS21"
3731+
positioning</a> <a href="#CSS21"
37383732
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> / <a href="#CSS3-FONTS"
37393733
rel=biblioentry>[CSS3-FONTS]<!--{{!CSS3-FONTS}}--></a>
37403734

css-text/Overview.src.html

+25-23
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ <h3 id="values">
207207
definition conventions</a> from [[!CSS21]]. Value types not defined in
208208
this specification are defined in CSS Level 2 Revision 1 [[!CSS21]].
209209
Other CSS modules may expand the definitions of these value types: for
210-
example [[CSS3COLOR]], when combined with this module, expands the
211-
definition of the &lt;color&gt; value type as used in this specification.</p>
210+
example [[CSS3VAL]], when combined with this module, expands the
211+
definition of the <var>&lt;length&gt;</var> value type as used in this specification.</p>
212212

213213
<p>In addition to the property-specific values listed in their definitions,
214214
all properties defined in this specification also accept the
@@ -333,6 +333,19 @@ <h3 id="text-transform">
333333
-->
334334
</dl>
335335

336+
<p>The definition of “word“ used for ''capitalize'' is UA-dependent;
337+
[[!UAX29]] is suggested (but not required) for determining such word
338+
boundaries. Authors should not expect ''capitalize'' to follow
339+
language-specific titlecasing conventions (such as skipping articles
340+
in English).
341+
342+
<div class="example">
343+
<p>The following example converts the ASCII characters
344+
used in abbreviations in Japanese text to their fullwidth variants
345+
so that they lay out and line break like ideographs:
346+
<pre>abbr:lang(ja) { text-transform: full-width; }</pre>
347+
</div>
348+
336349
<p>The case mapping rules for the character repertoire specified by the
337350
Unicode Standard can be found on the Unicode Consortium Web site
338351
[[!UNICODE]]. The UA must use the full case mappings for Unicode
@@ -370,32 +383,21 @@ <h3 id="text-transform">
370383
</div>
371384
-->
372385

373-
<p>The definition of "word" used for ''capitalize'' is UA-dependent;
374-
[[!UAX29]] is suggested (but not required) for determining such word
375-
boundaries. Authors should not expect ''capitalize'' to follow
376-
language-specific titlecasing conventions (such as skipping articles
377-
in English).
378-
379386
<p>The definition of fullwidth and halfwidth forms can be found on the
380387
Unicode consortium web site at [[!UAX11]].
381388
The mapping to fullwidth form is defined by taking code points with
382-
the &lt;wide&gt; or the &lt;narrow&gt; tag in their Decomposition_Mapping
383-
in [[!UAX44]]. For the &lt;narrow&gt; tag, the mapping is from the code
384-
point to the decomposition (minus &lt;narrow&gt; tag), and for the
385-
&lt;wide&gt; tag, the mapping is from the decomposition (minus the
386-
&lt;wide&gt; tag) back to the original code point.</p>
389+
the <code>&lt;wide&gt;</code> or the <code>&lt;narrow&gt;</code> tag
390+
in their <code>Decomposition_Mapping</code> in [[!UAX44]].
391+
For the <code>&lt;narrow&gt;</code> tag,
392+
the mapping is from the code point to the decomposition (minus <code>&lt;narrow&gt;</code> tag),
393+
and for the <code>&lt;wide&gt;</code> tag,
394+
the mapping is from the decomposition (minus the <code>&lt;wide&gt;</code> tag)
395+
back to the original code point.
387396

388397
<p>Text transformation happens after <a href="#white-space-rules">white
389398
space processing</a>, which means that ''full-width'' transforms
390399
only preserved U+0020 spaces to U+3000.
391400

392-
<div class="example">
393-
<p>The following example converts the ASCII characters in abbreviations
394-
in Japanese to their fullwidth variants so that they lay out and line
395-
break like ideographs:
396-
<pre>abbr:lang(ja) { text-transform: full-width; }</pre>
397-
</div>
398-
399401
<p class="note">
400402
A future level of CSS may introduce the ability to create custom mapping
401403
tables for less common text transforms, such as by an ''@text-transform''
@@ -2733,17 +2735,17 @@ <h2 class="no-num">Appendix F:
27332735
are not bound to this order as long as the resulting layout is the same.)
27342736

27352737
<ol>
2736-
<li><a href="http://www.w3.org/TR/css3-writing-modes/#text-combine-horizontal">text combination</a> [[!CSS3-WRITING-MODES]]
27372738
<li><a href="#white-space-rules">white space processing</a> part I (pre-wrapping)
2739+
<li><a href="http://www.w3.org/TR/css3-writing-modes/#text-combine-horizontal">text combination</a> [[!CSS3-WRITING-MODES]]
27382740
<li><a href="#text-transform">text transformation</a>
27392741
<li><a href="#wrapping">text wrapping</a> while applying per line:
27402742
<ol>
27412743
<li><a href="#text-indent">indentation</a>
27422744
<li><a href="http://www.w3.org/TR/css3-writing-modes/#text-direction">bidirectional reordering</a> [[!CSS21]] / [[!CSS3-WRITING-MODES]]
27432745
<li><a href="#white-space-rules">white space processing</a> part II
27442746
<li><a href="http://www.w3.org/TR/css3-writing-modes/#text-orientation">text orientation</a> [[!CSS3-WRITING-MODES]]
2745-
<li><a href="#spacing">default spacing</a>
2746-
<li><a href="http://www.w3.org/TR/css3-fonts/">font/glyph selection and kerning</a> [[!CSS21]] / [[!CSS3-FONTS]]
2747+
<li>'letter-spacing' and 'word-spacing'
2748+
<li><a href="http://www.w3.org/TR/css3-fonts/">font/glyph selection and positioning</a> [[!CSS21]] / [[!CSS3-FONTS]]
27472749
<li><a href="#hanging-punctuation">hanging punctuation</a>
27482750
</ol>
27492751
<li><a href="#justification">justification</a> (which may affect glyph selection and/or text wrapping, looping back into that step)

0 commit comments

Comments
 (0)