forked from w3c/csswg-drafts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOverview.html
More file actions
2308 lines (1778 loc) · 96.2 KB
/
Overview.html
File metadata and controls
2308 lines (1778 loc) · 96.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>CSS Text Module Level 4</title>
<link href="../default.css" rel="stylesheet" type="text/css">
<link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<link href="https://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css">
</head>
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"><a class="logo" href="http://www.w3.org/">
<img alt="W3C" height="48" src="https://www.w3.org/Icons/w3c_home" width="72">
</a>
</p>
<h1 class="p-name no-ref" id="title">CSS Text Module Level 4</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Unofficial Proposal Draft,
<time class="dt-updated" datetime="2015-01-07">7 January 2015</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:</dt>
<dd><a class="u-url" href="http://dev.w3.org/csswg/css-text-4/">http://dev.w3.org/csswg/css-text-4/</a></dd>
<dt>Feedback:</dt>
<dd><span><a href="mailto:www-style@w3.org?subject=%5Bcss-text%5D%20feedback">www-style@w3.org</a> with subject line “<kbd>[css-text] <var>… message topic …</var></kbd>” (<a href="http://lists.w3.org/Archives/Public/www-style/" rel="discussion">archives</a>)</span></dd>
<dt>Issue Tracking:</dt>
<dd><a href="#issues-index">Inline In Spec</a></dd>
<dt class="editor">Editors:</dt>
<dd class="editor">
<div class="p-author h-card vcard"><a class="p-name fn u-url url" href="http://fantasai.inkedblade.net/contact">fantasai</a> (<span class="p-org org">Invited Expert</span>)</div>
</dd>
<dd class="editor">
<div class="p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:kojiishi@gluesoft.co.jp">Koji Ishii</a> (<span class="p-org org">Invited Expert</span>)</div>
</dd>
<dd class="editor">
<div class="p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:stearns@adobe.com">Alan Stearns</a> (<span class="p-org org">Adobe Systems</span>)</div>
</dd>
</dl>
</div>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2014 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
</p>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<div class="p-summary" data-fill-with="abstract">
<p>This module defines properties for text manipulation and specifies their processing model. It covers line breaking, justification and alignment, white space handling, and text transformation.</p>
<a href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, in speech, etc.</div>
<h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
<div data-fill-with="status"></div>
<div data-fill-with="at-risk"></div>
<h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="content">Table of Contents</span></h2>
<div data-fill-with="table-of-contents" role="navigation">
<ul class="toc" role="directory">
<li><a href="#intro"><span class="secno">1</span> <span class="content">
Introduction</span></a></li>
<li><a href="#transforming"><span class="secno">2</span> <span class="content">
Transforming Text</span></a></li>
<li><a href="#white-space-processing"><span class="secno">3</span> <span class="content">
White Space Processing</span></a>
<ul class="toc">
<li><a href="#white-space-collapsing"><span class="secno">3.1</span> <span class="content">
White Space Collapsing: the <span class="property" data-link-type="propdesc" title="text-space-collapse">text-space-collapse</span> property</span></a></li>
<li><a href="#white-space-trim"><span class="secno">3.2</span> <span class="content">
White Space Trimming: the <span class="property" data-link-type="propdesc" title="text-space-trim">text-space-trim</span> property</span></a></li>
</ul>
</li>
<li><a href="#line-breaking"><span class="secno">4</span> <span class="content">
Line Breaking and Word Boundaries</span></a></li>
<li><a href="#wrapping"><span class="secno">5</span> <span class="content">
Text Wrapping</span></a>
<ul class="toc">
<li><a href="#text-wrap"><span class="secno">5.1</span> <span class="content">
Text Wrap Settings: the <span class="property" data-link-type="propdesc" title="text-wrap">text-wrap</span> property</span></a>
<ul class="toc">
<li><a href="#example-avoid"><span class="secno">5.1.1</span> <span class="content">
Example of using 'text-wrap: avoid' in presenting a footer</span></a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#white-space-property"><span class="secno">6</span> <span class="content">
White Space and Wrapping Shorthand: the <span class="property" data-link-type="propdesc" title="white-space">white-space</span> property</span></a></li>
<li><a href="#hyphenation"><span class="secno">7</span> <span class="content">
Breaking Within Words</span></a>
<ul class="toc">
<li><a href="#hyphenate-character"><span class="secno">7.1</span> <span class="content">
Hyphens: the <span class="property" data-link-type="propdesc" title="hyphenate-character">hyphenate-character</span> property</span></a></li>
<li><a href="#hyphenate-size-limits"><span class="secno">7.2</span> <span class="content">
Hyphenation Size Limit: the <span class="property" data-link-type="propdesc" title="hyphenate-limit-zone">hyphenate-limit-zone</span> property</span></a></li>
<li><a href="#hyphenate-char-limits"><span class="secno">7.3</span> <span class="content">
Hyphenation Character Limits: the <span class="property" data-link-type="propdesc" title="hyphenate-limit-chars">hyphenate-limit-chars</span> property</span></a></li>
<li><a href="#hyphenate-line-limits"><span class="secno">7.4</span> <span class="content">
Hyphenation Line Limits: the <span class="property" data-link-type="propdesc" title="hyphenate-limit-lines">hyphenate-limit-lines</span> and <span class="property" data-link-type="propdesc" title="hyphenate-limit-last">hyphenate-limit-last</span> properties</span></a></li>
</ul>
</li>
<li><a href="#alignment"><span class="secno">8</span> <span class="content">
Alignment and Justification</span></a>
<ul class="toc">
<li><a href="#character-alignment"><span class="secno">8.1</span> <span class="content">
Character-based Alignment in a Table Column</span></a></li>
</ul>
</li>
<li><a href="#spacing"><span class="secno">9</span> <span class="content">
Spacing</span></a>
<ul class="toc">
<li><a href="#text-spacing-property"><span class="secno">9.1</span> <span class="content">
Character Class Spacing: the <span class="property" data-link-type="propdesc" title="text-spacing">text-spacing</span> property</span></a>
<ul class="toc">
<li><a href="#fullwidth-collapsing"><span class="secno">9.1.1</span> <span class="content">
Fullwidth Punctuation Collapsing</span></a></li>
<li><a href="#text-spacing-classes"><span class="secno">9.1.2</span> <span class="content">
Text Spacing Character Classes</span></a></li>
<li><a href="#japanese-start-edges"><span class="secno">9.1.3</span> <span class="content">
Japanese Paragraph-start Conventions in CSS</span></a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#edge-effects"><span class="secno">10</span> <span class="content">
Edge Effects</span></a></li>
<li><a href="#conformance"><span class="secno"></span> <span class="content">
Conformance</span></a>
<ul class="toc">
<li><a href="#conventions"><span class="secno"></span> <span class="content">
Document conventions</span></a></li>
<li><a href="#conformance-classes"><span class="secno"></span> <span class="content">
Conformance classes</span></a></li>
<li><a href="#partial"><span class="secno"></span> <span class="content">
Partial implementations</span></a></li>
<li><a href="#experimental"><span class="secno"></span> <span class="content">
Experimental implementations</span></a></li>
<li><a href="#testing"><span class="secno"></span> <span class="content">
Non-experimental implementations</span></a></li>
</ul>
</li>
<li><a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ul class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a></li>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a></li>
</ul>
</li>
<li><a href="#index"><span class="secno"></span> <span class="content">Index</span></a></li>
<li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a></li>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a></li>
</ul></div>
<main>
<h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">
Introduction</span><a class="self-link" href="#intro"></a></h2>
<p class="issue" id="issue-e782977b"><a class="self-link" href="#issue-e782977b"></a>Add final level 3 content</p>
<h2 class="heading settled" data-level="2" id="transforming"><span class="secno">2. </span><span class="content">
Transforming Text</span><a class="self-link" href="#transforming"></a></h2>
<p class="issue" id="issue-e782977b"><a class="self-link" href="#issue-e782977b"></a>Add final level 3 content</p>
<h2 class="heading settled" data-level="3" id="white-space-processing"><span class="secno">3. </span><span class="content">
White Space Processing</span><a class="self-link" href="#white-space-processing"></a></h2>
<p class="issue" id="issue-64fd9247"><a class="self-link" href="#issue-64fd9247"></a>Add final level 3 tab-size and processing details</p>
<h3 class="heading settled" data-level="3.1" id="white-space-collapsing"><span class="secno">3.1. </span><span class="content">
White Space Collapsing: the <a class="property" data-link-type="propdesc" href="#propdef-text-space-collapse">text-space-collapse</a> property</span><a class="self-link" href="#white-space-collapsing"></a></h3>
<p class="issue" id="issue-257c8a37"><a class="self-link" href="#issue-257c8a37"></a>This section is still under discussion and may change in future drafts.</p>
<table class="definition propdef">
<tbody>
<tr>
<th>Name:</th>
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-text-space-collapse">text-space-collapse<a class="self-link" href="#propdef-text-space-collapse"></a></dfn></td>
</tr>
<tr>
<th>Value:</th>
<td class="prod">collapse <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> discard <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> preserve <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> preserve-breaks</td>
</tr>
<tr>
<th>Initial:</th>
<td>collapse</td>
</tr>
<tr>
<th>Applies to:</th>
<td>all elements</td>
</tr>
<tr>
<th>Inherited:</th>
<td>yes</td>
</tr>
<tr>
<th>Percentages:</th>
<td>n/a</td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
<td>as specified</td>
</tr>
<tr>
<th>Animatable:</th>
<td>no</td>
</tr>
</tbody></table>
<p class="issue" id="issue-6ad6d7be"><a class="self-link" href="#issue-6ad6d7be"></a>Need a property name</p>
<p>This property declares whether and how
<a href="#white-space-processing">white space</a> inside the element is
collapsed. Values have the following meanings, which must be interpreted
according to the white space processing rules:</p>
<dl data-dfn-for="text-space-collapse" data-dfn-type="value">
<dt><dfn class="css" data-dfn-for="text-space-collapse" data-dfn-type="value" data-export="" id="valdef-text-space-collapse-collapse">collapse<a class="self-link" href="#valdef-text-space-collapse-collapse"></a></dfn>
</dt>
<dd>
This value directs user agents to collapse sequences of white space
into a single character
(or <a href="http://www.w3.org/TR/css-text/#line-break-transform">in some cases</a>, no character).
</dd>
<dt><dfn class="css" data-dfn-for="text-space-collapse" data-dfn-type="value" data-export="" id="valdef-text-space-collapse-preserve">preserve<a class="self-link" href="#valdef-text-space-collapse-preserve"></a></dfn>
</dt>
<dd>
This value prevents user agents
from collapsing sequences of white space.
Line feeds are preserved as forced line breaks.
</dd>
<dt><dfn class="css" data-dfn-for="text-space-collapse" data-dfn-type="value" data-export="" id="valdef-text-space-collapse-preserve-breaks">preserve-breaks<a class="self-link" href="#valdef-text-space-collapse-preserve-breaks"></a></dfn>
</dt>
<dd>
This value collapses white space as for <a class="css" data-link-type="maybe" href="#valdef-text-space-collapse-collapse">collapse</a>, but preserves
line feeds as forced line breaks.
</dd>
<dt><dfn class="css" data-dfn-for="text-space-collapse" data-dfn-type="value" data-export="" id="valdef-text-space-collapse-discard">discard<a class="self-link" href="#valdef-text-space-collapse-discard"></a></dfn>
</dt>
<dd>
This value directs user agents to "discard" all white space in the
element.
Issue: Does this preserve line break opportunities or no? Do we need a "hide" value?
</dd>
</dl>
<div class="example">
<p>The following style rules implement MathML’s white space processing:</p>
<pre>@namespace m "http://www.w3.org/1998/Math/MathML";
m|* {
text-space-collapse: discard;
}
m|mi, m|mn, m|mo, m|ms, m|mtext {
text-space-collapse: trim-inner;
}
</pre>
</div>
<p class="issue" id="issue-257c8a37"><a class="self-link" href="#issue-257c8a37"></a>This section is still under discussion and may change in future drafts.</p>
<h3 class="heading settled" data-level="3.2" id="white-space-trim"><span class="secno">3.2. </span><span class="content">
White Space Trimming: the <a class="property" data-link-type="propdesc" href="#propdef-text-space-trim">text-space-trim</a> property</span><a class="self-link" href="#white-space-trim"></a></h3>
<table class="definition propdef">
<tbody>
<tr>
<th>Name:</th>
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-text-space-trim">text-space-trim<a class="self-link" href="#propdef-text-space-trim"></a></dfn></td>
</tr>
<tr>
<th>Value:</th>
<td class="prod">none <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> trim-inner <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-any">||</a> consume-before <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-any">||</a> consume-after</td>
</tr>
<tr>
<th>Initial:</th>
<td>collapse</td>
</tr>
<tr>
<th>Applies to:</th>
<td>all elements</td>
</tr>
<tr>
<th>Inherited:</th>
<td>no</td>
</tr>
<tr>
<th>Percentages:</th>
<td>n/a</td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
<td>as specified</td>
</tr>
<tr>
<th>Animatable:</th>
<td>no</td>
</tr>
</tbody></table>
<p>This property allows authors to specify trimming behavior
at the beginning and end of a box.
Values have the following meanings,
which must be interpreted according to the white space processing rules:</p>
<dl data-dfn-for="text-space-trim" data-dfn-type="value">
<dt><dfn class="css" data-dfn-for="text-space-trim" data-dfn-type="value" data-export="" id="valdef-text-space-trim-trim-inner">trim-inner<a class="self-link" href="#valdef-text-space-trim-trim-inner"></a></dfn>
</dt>
<dd>
For block containers this value directs UAs to discard all whitespace
at the beginning of the element up to and including the last line feed
before the first non-white-space character in the element as well as
to discard all white space at the end of the element starting with the
first line feed after the last non-white-space character in the element.
For other elements this value directs UAs to discard all whitespace
at the beginning and end of the element.
</dd>
<dt><dfn class="css" data-dfn-for="text-space-trim" data-dfn-type="value" data-export="" id="valdef-text-space-trim-consume-before">consume-before<a class="self-link" href="#valdef-text-space-trim-consume-before"></a></dfn>
</dt>
<dd>
This value directs the UA to collapse all collapsible whitespace
immediately before the start of the element.
</dd>
<dt><dfn class="css" data-dfn-for="text-space-trim" data-dfn-type="value" data-export="" id="valdef-text-space-trim-consume-after">consume-after<a class="self-link" href="#valdef-text-space-trim-consume-after"></a></dfn>
</dt>
<dd>
This value directs the UA to collapse all collapsible whitespace
immediately after the end of the element.
</dd>
</dl>
<div class="example">
<p>The following style rules render DT elements as a comma-separated list:
</p>
<pre>dt { display: inline; }
dt + dt:before { content: ", "; text-space-collapse: consume-before; }
</pre>
</div>
<h2 class="heading settled" data-level="4" id="line-breaking"><span class="secno">4. </span><span class="content">
Line Breaking and Word Boundaries</span><a class="self-link" href="#line-breaking"></a></h2>
<p class="issue" id="issue-e782977b"><a class="self-link" href="#issue-e782977b"></a>Add final level 3 content</p>
<h2 class="heading settled" data-level="5" id="wrapping"><span class="secno">5. </span><span class="content">
Text Wrapping</span><a class="self-link" href="#wrapping"></a></h2>
<p>Text wrapping is controlled by the <a class="property" data-link-type="propdesc" href="#propdef-text-wrap">text-wrap</a> and overflow-wrap properties:</p>
<p class="issue" id="issue-cb66c9cf"><a class="self-link" href="#issue-cb66c9cf"></a>Add final level 3 overflow-wrap</p>
<h3 class="heading settled" data-level="5.1" id="text-wrap"><span class="secno">5.1. </span><span class="content">
Text Wrap Settings: the <a class="property" data-link-type="propdesc" href="#propdef-text-wrap">text-wrap</a> property</span><a class="self-link" href="#text-wrap"></a></h3>
<table class="definition propdef">
<tbody>
<tr>
<th>Name:</th>
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-text-wrap">text-wrap<a class="self-link" href="#propdef-text-wrap"></a></dfn></td>
</tr>
<tr>
<th>Value:</th>
<td class="prod">normal <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> none <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> avoid <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> balance</td>
</tr>
<tr>
<th>Initial:</th>
<td>normal</td>
</tr>
<tr>
<th>Applies to:</th>
<td>all elements</td>
</tr>
<tr>
<th>Inherited:</th>
<td>yes</td>
</tr>
<tr>
<th>Percentages:</th>
<td>n/a</td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
5CAC
<td>as specified</td>
</tr>
<tr>
<th>Animatable:</th>
<td>no</td>
</tr>
</tbody></table>
<p>This property specifies the mode for text wrapping. Possible values:</p>
<dl data-dfn-for="text-wrap" data-dfn-type="value">
<dt><dfn class="css" data-dfn-for="text-wrap" data-dfn-type="value" data-export="" id="valdef-text-wrap-normal">normal<a class="self-link" href="#valdef-text-wrap-normal"></a></dfn>
</dt>
<dd>
Lines may break at allowed break points, as determined by the
line-breaking rules in effect. Line breaking behavior defined
for the WJ, ZW, and GL line-breaking classes in
<a data-biblio-type="normative" data-link-type="biblio" href="#biblio-uax14" title="UAX14">[UAX14]</a> must be honored.
</dd>
<dt><dfn class="css" data-dfn-for="text-wrap" data-dfn-type="value" data-export="" id="valdef-text-wrap-none">none<a class="self-link" href="#valdef-text-wrap-none"></a></dfn>
</dt>
<dd>
Lines may not break; text that does not fit within the block container
overflows it.
</dd>
<dt><dfn class="css" data-dfn-for="text-wrap" data-dfn-type="value" data-export="" id="valdef-text-wrap-avoid">avoid<a class="self-link" href="#valdef-text-wrap-avoid"></a></dfn>
</dt>
<dd>
Line breaking is suppressed within the element: the UA may only break
within the element if there are no other valid break points in the
line. If the text breaks, line-breaking restrictions are honored as for
<a class="css" data-link-for="text-wrap" data-link-type="maybe" href="#valdef-text-wrap-normal">normal</a>.
</dd>
<dt><dfn class="css" data-dfn-for="text-wrap" data-dfn-type="value" data-export="" id="valdef-text-wrap-balance">balance<a class="self-link" href="#valdef-text-wrap-balance"></a></dfn>
</dt>
<dd>
Same as <a class="css" data-link-for="text-wrap" data-link-type="maybe" href="#valdef-text-wrap-normal">normal</a> for inline-level elements.
For block-level elements line breaks are chosen to minimize the deviation from the average line length over the entire element
(including lines that end in a forced break).
The exact algorithm is UA-defined.
<p>UAs may treat this value as <a class="css" data-link-for="text-wrap" data-link-type="maybe" href="#valdef-text-wrap-normal">normal</a> if there are more than ten lines to balance.</p>
</dd>
</dl>
<p>Regardless of the <a class="property" data-link-type="propdesc" href="#propdef-text-wrap">text-wrap</a> value, lines always break at forced breaks:
for all values, line-breaking behavior defined for the BK, CR, LF, CM
NL, and SG line breaking classes in <a data-biblio-type="normative" data-link-type="biblio" href="#biblio-uax14" title="UAX14">[UAX14]</a> must
be honored.</p>
<p>When <span class="property"><a class="property" data-link-type="propdesc" href="#propdef-text-wrap">text-wrap</a></span> is set to <a class="css" data-link-for="text-wrap" data-link-type="maybe" href="#valdef-text-wrap-normal">normal</a> or
<a class="css" data-link-for="text-wrap" data-link-type="maybe" href="#valdef-text-wrap-avoid">avoid</a>, UAs that allow breaks at punctuation other than spaces
should prioritize breakpoints.
For example, if breaks after slashes have a lower priority than spaces,
the sequence “check /etc” will never break between the ‘/’ and the ‘e’.
The UA may use the width of the containing block, the text’s language,
and other factors in assigning priorities.
As long as care is taken to avoid such awkward breaks, allowing breaks at
appropriate punctuation other than spaces is recommended, as it results
in more even-looking margins, particularly in narrow measures.</p>
<p></p>
<h4 class="heading settled" data-level="5.1.1" id="example-avoid"><span class="secno">5.1.1. </span><span class="content">
Example of using 'text-wrap: avoid' in presenting a footer</span><a class="self-link" href="#example-avoid"></a></h4>
<div class="example">
<p>The priority of breakpoints can be set to reflect the intended
grouping of text.</p>
<p>Given the rules</p>
<pre>footer { text-wrap: avoid; /* inherits to all descendants */ }
</pre>
<p>and the following markup:</p>
<pre><footer>
<venue>27th Internationalization and Unicode Conference</venue>
&#8226; <date>April 7, 2005</date> &#8226;
<place>Berlin, Germany</place>
</footer>
</pre>
<p>In a narrow window the footer could be broken as</p>
<pre>27th Internationalization and Unicode Conference •
April 7, 2005 • Berlin, Germany
</pre>
<p>or in a narrower window as</p>
<pre>27th Internationalization and Unicode
Conference • April 7, 2005 •
Berlin, Germany
</pre>
<p>but not as</p>
<pre>27th Internationalization and Unicode Conference • April
7, 2005 • Berlin, Germany
</pre>
</div>
<h2 class="heading settled" data-level="6" id="white-space-property"><span class="secno">6. </span><span class="content">
White Space and Wrapping Shorthand: the <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css2/text.html#propdef-white-space">white-space</a> property</span><a class="self-link" href="#white-space-property"></a></h2>
<p>Diff needs to have the shorthand details</p>
<h2 class="heading settled" data-level="7" id="hyphenation"><span class="secno">7. </span><span class="content">
Breaking Within Words</span><a class="self-link" href="#hyphenation"></a></h2>
<p class="issue" id="issue-e782977b"><a class="self-link" href="#issue-e782977b"></a>Add final level 3 content</p>
<h3 class="heading settled" data-level="7.1" id="hyphenate-character"><span class="secno">7.1. </span><span class="content">
Hyphens: the <a class="property" data-link-type="propdesc" href="#propdef-hyphenate-character">hyphenate-character</a> property</span><a class="self-link" href="#hyphenate-character"></a></h3>
<table class="definition propdef">
<tbody>
<tr>
<th>Name:</th>
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-hyphenate-character">hyphenate-character<a class="self-link" href="#propdef-hyphenate-character"></a></dfn></td>
</tr>
<tr>
<th>Value:</th>
<td class="prod">auto <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> <string></td>
</tr>
<tr>
<th>Initial:</th>
<td>auto</td>
</tr>
<tr>
<th>Applies to:</th>
<td>all elements</td>
</tr>
<tr>
<th>Inherited:</th>
<td>yes</td>
</tr>
<tr>
<th>Percentages:</th>
<td>n/a</td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
<td>as specified</td>
</tr>
<tr>
<th>Animatable:</th>
<td>no</td>
</tr>
</tbody></table>
<p>This property specifies strings that are shown between parts of
hyphenated words. The <dfn class="css" data-dfn-for="hyphenate-character" data-dfn-type="value" data-export="" id="valdef-hyphenate-character-auto"><a class="css" data-link-type="maybe" href="#valdef-hyphenate-character-auto">auto</a><a class="self-link" href="#valdef-hyphenate-character-auto"></a></dfn> value means that the user agent should
find an appropriate value, preferably from the same source as the
hyphenation dictionary. If a string is specified, it appears at
the end of the line before a hyphenation break.</p>
<div class="example">
In Latin scripts, the hyphen character (U+2010) is often used to
indicate that a word has been split. Normally, it will not be
necessary to set it explicitly. However, this can easily be done:
<pre>article { hyphenate-character: "\2010" }
</pre>
</div>
<p class="note" role="note">
Both hyphens triggered by automatic hyphenation and
hyphens triggered by soft hyphens are rendered according to
<a class="property" data-link-type="propdesc" href="#propdef-hyphenate-character">hyphenate-character</a>.
</p>
<h3 class="heading settled" data-level="7.2" id="hyphenate-size-limits"><span class="secno">7.2. </span><span class="content">
Hyphenation Size Limit: the <a class="property" data-link-type="propdesc" href="#propdef-hyphenate-limit-zone">hyphenate-limit-zone</a> property</span><a class="self-link" href="#hyphenate-size-limits"></a></h3>
<table class="definition propdef">
<tbody>
<tr>
<th>Name:</th>
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-hyphenate-limit-zone">hyphenate-limit-zone<a class="self-link" href="#propdef-hyphenate-limit-zone"></a></dfn></td>
</tr>
<tr>
<th>Value:</th>
<td class="prod"><percentage> <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> <length></td>
</tr>
<tr>
<th>Initial:</th>
<td>0</td>
</tr>
<tr>
<th>Applies to:</th>
<td>block containers</td>
</tr>
<tr>
<th>Inherited:</th>
<td>yes</td>
</tr>
<tr>
<th>Percentages:</th>
<td>refers to width of the line box</td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
<td>as specified</td>
</tr>
<tr>
<th>Animatable:</th>
<td>no</td>
</tr>
</tbody></table>
<p class="issue" id="issue-acbeefa8"><a class="self-link" href="#issue-acbeefa8"></a>Is <a class="property" data-link-type="propdesc" href="#propdef-hyphenate-limit-zone">hyphenate-limit-zone</a> a good name? Comments/suggestions?
</p>
<p>This property specifies the maximum amount of unfilled space (before
justification) that may be left in the line box before hyphenation is
triggered to pull part of a word from the next line back up into the
current line.</p>
<h3 class="heading settled" data-level="7.3" id="hyphenate-char-limits"><span class="secno">7.3. </span><span class="content">
Hyphenation Character Limits: the <a class="property" data-link-type="propdesc" href="#propdef-hyphenate-limit-chars">hyphenate-limit-chars</a> property</span><a class="self-link" href="#hyphenate-char-limits"></a></h3>
<table class="definition propdef">
<tbody>
<tr>
<th>Name:</th>
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-hyphenate-limit-chars">hyphenate-limit-chars<a class="self-link" href="#propdef-hyphenate-limit-chars"></a></dfn></td>
</tr>
<tr>
<th>Value:</th>
<td class="prod">[auto <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> <integer>]<a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#mult-num-range" title="{A,B}">{1,3}</a></td>
</tr>
<tr>
<th>Initial:</th>
<td>auto</td>
</tr>
<tr>
<th>Applies to:</th>
<td>all elements</td>
</tr>
<tr>
<th>Inherited:</th>
<td>yes</td>
</tr>
<tr>
<th>Percentages:</th>
<td>n/a</td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
<td>as specified</td>
</tr>
<tr>
<th>Animatable:</th>
<td>no</td>
</tr>
</tbody></table>
<p>This property specifies the minimum number of characters in a
hyphenated word. If the word does not meet the required minimum
number of characters in the word / before the hyphen / after the
hyphen, then the word must not be hyphenated. Nonspacing combining
marks (<span class="issue" id="issue-5e9e02a8"><a class="self-link" href="#issue-5e9e02a8"></a>Unicode class</span>) and intra-word
punctuation (Unicode classes P*) do not count towards the minimum.</p>
<p>If three values are specified, the first value is the required
minimum for the total characters in a word, the second value is
the minimum for characters before the hyphenation point, and
A0B2
the third value is the minimum for characters after the hyphenation
point. If the third value is missing, it is the same as the second.
If the second value is missing, then it is <a class="css" data-link-type="maybe" href="#valdef-hyphenate-character-auto">auto</a>. The <a class="css" data-link-type="maybe" href="#valdef-hyphenate-character-auto">auto</a>
value means that the UA chooses a value that adapts to the current
layout.</p>
<p class="note" role="note">Unless the UA is able to calculate a better value, it
is suggested that <a class="css" data-link-type="maybe" href="#valdef-hyphenate-character-auto">auto</a> means 2 for before and after, and 5 for
the word total.
</p>
<div class="example">
In the example below, the minimum size of a hyphenated word is
left to the UA (which means it may vary depending on the language,
the length of the line, or other factors), but the minimum number
of characters before and after the hyphenation point is set to 3.
<pre>p { hyphenate-limit-chars: auto 3; }
</pre>
</div>
<h3 class="heading settled" data-level="7.4" id="hyphenate-line-limits"><span class="secno">7.4. </span><span class="content">
Hyphenation Line Limits: the <a class="property" data-link-type="propdesc" href="#propdef-hyphenate-limit-lines">hyphenate-limit-lines</a> and <a class="property" data-link-type="propdesc" href="#propdef-hyphenate-limit-last">hyphenate-limit-last</a> properties</span><a class="self-link" href="#hyphenate-line-limits"></a></h3>
<table class="definition propdef">
<tbody>
<tr>
<th>Name:</th>
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-hyphenate-limit-lines">hyphenate-limit-lines<a class="self-link" href="#propdef-hyphenate-limit-lines"></a></dfn></td>
</tr>
<tr>
<th>Value:</th>
<td class="prod">no-limit <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> <integer></td>
</tr>
<tr>
<th>Initial:</th>
<td>no-limit</td>
</tr>
<tr>
<th>Applies to:</th>
<td>block containers</td>
</tr>
<tr>
<th>Inherited:</th>
<td>yes</td>
</tr>
<tr>
<th>Percentages:</th>
<td>n/a</td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
<td>as specified</td>
</tr>
<tr>
<th>Animatable:</th>
<td>no</td>
</tr>
</tbody></table>
<p>This property indicates the maximum number of successive hyphenated
lines in an element. The <span class="css">no-limit</span> value means that there is no limit.</p>
<p>In some cases, user agents may not be able to honor the specified value.
(See overflow-wrap.) It is not defined whether hyphenation introduced by
such emergency breaking influences nearby hyphenation points.</p>
<table class="definition propdef">
<tbody>
<tr>
<th>Name:</th>
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-hyphenate-limit-last">hyphenate-limit-last<a class="self-link" href="#propdef-hyphenate-limit-last"></a></dfn></td>
</tr>
<tr>
<th>Value:</th>
<td class="prod">none <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> always <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> column <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> page <a data-link-for="" data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> spread</td>
</tr>
<tr>
<th>Initial:</th>
<td>none</td>
</tr>
<tr>
<th>Applies to:</th>
<td>block containers</td>
</tr>
<tr>
<th>Inherited:</th>
<td>yes</td>
</tr>
<tr>
<th>Percentages:</th>
<td>n/a</td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
<td>as specified</td>
</tr>
<tr>
<th>Animatable:</th>
<td>no</td>
</tr>
</tbody></table>
<p>This property indicates hyphenation behavior at the end of elements,
column, pages and spreads. A spread is a set of two pages that are
visible to the reader at the same time. Values are:</p>
<dl data-dfn-for="hyphenate-limit-lines" data-dfn-type="value">
<dt><dfn class="css" data-dfn-for="hyphenate-limit-lines" data-dfn-type="value" data-export="" id="valdef-hyphenate-limit-lines-none">none<a class="self-link" href="#valdef-hyphenate-limit-lines-none"></a></dfn>
</dt>
<dd>
No restrictions imposed.
</dd>
<dt><dfn class="css" data-dfn-for="hyphenate-limit-lines" data-dfn-type="value" data-export="" id="valdef-hyphenate-limit-lines-always">always<a class="self-link" href="#valdef-hyphenate-limit-lines-always"></a></dfn>
</dt>
<dd>
The last full line of the element, or the last line before any
column, page, or spread break inside the element should not be
hyphenated.
</dd>
<dt><dfn class="css" data-dfn-for="hyphenate-limit-lines" data-dfn-type="value" data-export="" id="valdef-hyphenate-limit-lines-column">column<a class="self-link" href="#valdef-hyphenate-limit-lines-column"></a></dfn>
</dt>
<dd>
The last line before any column, page, or spread break inside
the element should not be hyphenated.
</dd>
<dt><dfn class="css" data-dfn-for="hyphenate-limit-lines" data-dfn-type="value" data-export="" id="valdef-hyphenate-limit-lines-page">page<a class="self-link" href="#valdef-hyphenate-limit-lines-page"></a></dfn>
</dt>
<dd>
The last line before page or spread break inside the element
should not be hyphenated.
</dd>
<dt><dfn class="css" data-dfn-for="hyphenate-limit-lines" data-dfn-type="value" data-export="" id="valdef-hyphenate-limit-lines-spread">spread<a class="self-link" href="#valdef-hyphenate-limit-lines-spread"></a></dfn>
</dt>
<dd>
The last line before any spread break inside the element should
not be hyphenated.
</dd>
</dl>
<div class="example">
<pre>p { hyphenate-limit-last: always }
div.chapter { hyphenate-limit-last: spread }
</pre>
</div>
<div class="example">
<p>A paragraph may be formatted like this when 'hyphenate-limit-last: none' is set:</p>
<pre>This is just a
simple example
to show Antarc-
tica.
</pre>
<p>With 'hyphenate-limit-last: always' one would get:</p>
<pre>This is just a