-
Notifications
You must be signed in to change notification settings - Fork 791
Expand file tree
/
Copy pathOverview.html
More file actions
1807 lines (1367 loc) · 48 KB
/
Overview.html
File metadata and controls
1807 lines (1367 loc) · 48 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 PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang=en>
<head profile="http://dublincore.org/documents/2008/08/04/dc-html/ ">
<title>CSS Page Floats</title>
<link href="http://purl.org/dc/terms/" rel=schema.dcterms>
<link href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
rel=dcterms.rights>
<meta content="CSS Page Floats" name=dcterms.title>
<meta content=text name=dcterms.type>
<meta content=2013-09-24 name=dcterms.date>
<meta content="Håkon Wium Lie" name=dcterms.creator>
<meta content=W3C name=dcterms.publisher>
<meta content="http://dev.w3.org/csswg/css-page-floats/"
name=dcterms.identifier>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
<link href="../default.css" rel=stylesheet type="text/css">
<link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
type="text/css">
<style type="text/css">
.example img { display: block }
.example { background: #ddd }
body { line-height: 1.3 }
.remove, .unimplemented { display: none }
table.string-set-example { font-family: monospace; border-collapse: collapse }
table.string-set-example div.pre {
width: 12em; white-space: pre;
}
table.string-set-example td {
padding: 0.3em;
border: thin solid black
}
</style>
<body>
<div class=head> <!--begin-logo-->
<p><a href="http://www.w3.org/"><img alt=W3C height=48
src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
<h1>CSS Page Floats</h1>
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft 24 September 2013</h2>
<dl>
<dt>This version:
<dd><a
href="http://dev.w3.org/csswg/css-page-floats/">http://www.w3.org/TR/2013/ED-css3-gcpm-20130924/</a>
<dt>Latest version:
<dd><a
href="http://www.w3.org/TR/css3-gcpm/">http://www.w3.org/TR/css-page-floats/</a>
<!--
<dt>Previous version:
<dd><a href="http://www.w3.org/TR/2010/WD-css-page-floats/">
http://www.w3.org/TR/2010/WD-css-page-floats/</a>
-->
<dt>Feedback:
<dd><a
href="mailto:www-style@w3.org?subject=%5Bcss-gcpm%5D%20feedback">www-style@w3.org</a>
with subject line “<kbd>[css-page-floats] <var>… message topic
…</var></kbd>” (<a
href="http://lists.w3.org/Archives/Public/www-style/"
rel=discussion>archives</a>)
<dt>Editor:
<dd>Håkon Wium Lie, Opera Software, howcome@opera.com
</dl>
<!--begin-copyright-->
<p class=copyright><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
rel=license>Copyright</a> © 2013 <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>
<!--end-copyright-->
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc" id=abstract>Abstract</h2>
<p>This module describes features often used in printed publications.
Figures and photos are often moved to the top or bottom of columns and
pages, along with their captions. Some elements (e.g., call-outs) push
aside other content in the flow of text, and sometimes one column is given
a different styling than others. This draft describes how to achieve these
effects, both on paper and screens.
<h2 class="no-num no-toc" id=status-of-this-document>Status of this
document</h2>
<!--begin-status-->
<p>This is a public copy of the editors' draft. It is provided for
discussion only and may change at any moment. Its publication here does
not imply endorsement of its contents by W3C. Don't cite this document
other than as work in progress.
<p>The (<a
href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
mailing list <a
href="mailto:www-style@w3.org?Subject=%5Bcss-page-floats%5D%20PUT%20SUBJECT%20HERE">
www-style@w3.org</a> (see <a
href="http://www.w3.org/Mail/Request">instructions</a>) is preferred for
discussion of this specification. When sending e-mail, please put the text
“css-page-floats” in the subject, preferably like this:
“[<!---->css-page-floats<!---->] <em>…summary of comment…</em>”
<p>This document was produced by the <a
href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part of
the <a href="http://www.w3.org/Style/">Style Activity</a>).
<p>This document was produced by a group operating under the <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
2004 W3C Patent Policy</a>. W3C maintains a <a
href="http://www.w3.org/2004/01/pp-impl/32061/status"
rel=disclosure>public list of any patent disclosures</a> made in
connection with the deliverables of the group; that page also includes
instructions for disclosing a patent. An individual who has actual
knowledge of a patent which the individual believes contains <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
Claim(s)</a> must disclose the information in accordance with <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
6 of the W3C Patent Policy</a>.</p>
<!--end-status-->
<p>This WD contains functionality that the CSS WG finds interesting and
useful. The described functionality has been split off from <a
href="#CSS3GCPM" rel=biblioentry>[CSS3GCPM]<!--{{CSS3GCPM}}--></a> draft.
<h2 class="no-num no-toc" id=table-of-contents><a name=contents>Table of
contents</a></h2>
<!--begin-toc-->
<ul class=toc>
<li class=no-num><a href="#introduction">Introduction</a>
<li><a href="#page-floats"><span class=secno>1. </span>Page floats</a>
<ul class=toc>
<li><a href="#floating-to-the-topbottom-top-bottom-sna"><span
class=secno>1.1. </span>Floating to the top/bottom: top, bottom,
snap</a>
<li><a href="#spanning-columns"><span class=secno>1.2. </span>Spanning
columns</a>
<li><a href="#deferring-floats-float-defer-column-floa"><span
class=secno>1.3. </span>Deferring floats: float-defer-column,
float-defer-page</a>
<ul class=toc>
<li><a href="#float-defer-column"><span class=secno>1.3.1.
</span>‘<code class=property>float-defer-column</code>’</a>
<li><a href="#float-defer-page"><span class=secno>1.3.2.
</span>‘<code class=property>float-defer-page</code>’</a>
</ul>
<li><a href="#clearing-page-floats"><span class=secno>1.4.
</span>Clearing page floats</a>
<li><a href="#floating-inside-and-outside-pages"><span class=secno>1.5.
</span>Floating inside and outside pages</a>
<li><a href="#wrapping-around-page-floats"><span class=secno>1.6.
</span>Wrapping around page floats</a>
<li><a href="#the-float-offset-property"><span class=secno>1.7.
</span>The ‘<code class=property>float-offset</code>’ property</a>
<li><a href="#overconstrained-page-floats"><span class=secno>1.8.
</span>Overconstrained page floats</a>
</ul>
<li><a href="#exclusions"><span class=secno>2. </span>Exclusions</a>
<ul class=toc>
<li><a href="#the-clear-side-property"><span class=secno>2.1. </span>The
‘<code class=property>clear-side</code>’ property</a>
<li><a href="#exclusions-based-on-images"><span class=secno>2.2.
</span>Exclusions based on images</a>
<li><a href="#exclusions-based-on-rendered-content"><span
class=secno>2.3. </span>Exclusions based on rendered content</a>
<li><a href="#exclusions-based-on-shapes"><span class=secno>2.4.
</span>Exclusions based on shapes</a>
</ul>
<li><a href="#regions"><span class=secno>3. </span>Regions</a>
<li><a href="#regions-and-exclusions-examples"><span class=secno>4.
</span>Regions and Exclusions examples</a>
<li><a href="#conformance"><span class=secno>5. </span>Conformance</a>
<li class=no-num><a href="#acknowledgments">Acknowledgments</a>
<li class=no-num><a href="#references">References</a>
<ul class=toc>
<li class=no-num><a href="#normative-references">Normative
references</a>
<li class=no-num><a href="#other-references">Other references</a>
</ul>
<li class=no-num><a href="#index">Index</a>
<li class=no-num><a href="#property-index">Property index</a>
</ul>
<!--end-toc-->
<h2 class=no-num id=introduction>Introduction</h2>
<p>(This section is not normative.)
<p>This module describes features often used in printed publications.
Figures and photos are often moved to the top or bottom of columns and
pages, along with their captions. Some elements (e.g., call-outs) push
aside other content in the flow of text, and sometimes one column is given
a different styling than others. This draft describes how to achieve these
effects, both on paper and screens.
<h2 id=page-floats><span class=secno>1. </span>Page floats</h2>
<p>In page-based layouts, images and figures are often displayed at the top
or bottom of pages. This specificaton adds new keywords on the ‘<code
class=property>float</code>’ property to create <em>page floats</em>. A
page float can float inside its natural column/page, or its placement can
be deferred to a following column/page with the <em>float-defer</em>
properties. Page floats can be set to span several columns, thereby
supporting commonly used newspaper layouts. New values on the ‘<code
class=property>clear</code>’ property adds further ways of refining
layouts with page floats.
<p class=note>Not all multicol elements are constrained by the page box.
Therefore, a more accurate term for page floats may be <em>column
floats</em> as all of them are constrained by the column box. However, in
most cases, page floats seems like a better term.
<h3 id=floating-to-the-topbottom-top-bottom-sna><span class=secno>1.1.
</span>Floating to the top/bottom: top, bottom, snap</h3>
<p>These new keywords on ‘<code class=property>float</code>’ have been
added:
<dl>
<dt>top
<dd>The float is floated to the top of the column
<dt>bottom
<dd>The float is floated to the bottom of the column <!--
<dt>top-corner
<dd>the box is floated to the top of the last column (in the inline direction) that fits inside the multicol element on the same page.
<dt>bottom-corner
<dd>similar to 'top-corner', exept the box is floated to the bottom
-->
<dt>snap(<length> <length>? [, top | bottom | near ]?)
<dd>
<p>Makes the element float to the top or bottom if it naturally appears
within a certain distance from the top or bottom. The length value(s)
specifies the maxium distance from the top/bottom that an element must
be within in order to be floated; one length value specifies the
distance from both the top and the bottom, two length values specify the
distance from the top and bottom, respectively.
<p>The optional keyword value specifies where the element is floated:
top, bottom, or the nearest of the two. The initial value is ‘<code
class=property>near</code>’. If ‘<code class=property>near</code>’
is in effect and the element is within the specified distance both from
the top and the bottom, bottom wins.
<p>An element is considered to be a float if it has a snap() value, even
if the element does not appear within the specified distance. This way,
it can be determined whether an element is float or not without laying
out the document.
<dt>snap
<dd>same as <tt>snap(2em, near)</tt>
</dl>
<p>These new keywords only apply in paged media; in continous media
declarations with these keywords are ignored.
<p>Elements with any of these new keywords are called ‘<code
class=css>page floats</code>’. Each page float has a <em>natural
column</em>, which is the column where the element would have started to
appears it it was not a float. Also, each page float has a <em>natural
page</em>, which is the page where the element would have started if the
was not a float. Unless other constrained by lack of space or other
float-* properties, page floats should appear in their natural column on
the natural page.
<div class=example>
<p>Float figure to top of natural column:
<pre>
.figure { float: top }
</pre>
<img alt="sample rendering" src=7.png></div>
<div class=example>
<pre>
.figure { float: top; width: 50% }
</pre>
<img alt="sample rendering" src=7b.png></div>
<div class=example>
<p>In this example, a figure naturally appears close to a column break.
There is not enough space for the figure in the first column, and it is
therefore placed in the second column, leaving white space at the bottom
of the first column.</p>
<img alt="sample rendering" src=23.png>
<p>To avoid the white space, the image can be floated to the nearest edge
(in the block direction):
<pre>
.figure { float: snap }
</pre>
<p>In this example, the figure is already at the nearest edge, so it does
not move. However, page floats allow subsequent content to be displayed
before the page float and the white space can therefore be filled:</p>
<img alt="sample rendering" src=7.png></div>
<div class=example>
<p>In this example, two figures naturally appear in the text flow:</p>
<img alt="sample rendering" src=20.png>
<p>A typographer would typically try to avoid single lines of text
above/below figures, which can be achieved with:
<pre>
div.figure { float: snap(1.5em) }
</pre>
<p>The length value specifies the reach of the snap function; in this
example the second figure is affected, but not the first.
</div>
<div class=example>
<p>In this example, two figures naturally appear in the text flow:</p>
<img alt="sample rendering" src=20.png>
<p>To make the figures snap to the nearest edges, this code can be
applied:
<pre>
div.figure { float: snap(2.5em) }
</pre>
<p>The resultant rendering is:</p>
<img alt="sample rendering" src=22.png></div>
<div class=example>
<p>Float figure to top of the natural column, spanning all columns:
<pre>
.figure { float: top; column-span: all }
</pre>
<img alt="sample redering" src=15.png></div>
<div class=example>
<p>In this example, tables will snap to the top/bottom if the top/bottom
of the border box is closer than ‘<code class=css>3em</code>’ from
the top/bottom of the page/column.
<pre>
table { float: snap }
table { float: snap(3em) }
table { float: snap(3em, bottom) }
table { float: snap(3em 2em, bottom) }
</pre>
</div>
<p class=issue>Do numeric values, to represent line numbers, make sense,
like for orphans/widows?
<h3 id=spanning-columns><span class=secno>1.2. </span>Spanning columns</h3>
<p>The ‘<code class=property>column-span</code>’ property is extended
with integer values so that elements can span several columns. If the
specified integer value is equal to, or larger than the number of columns
in the multicol element, the number of columns spanned will be the same as
if ‘<code class=css>column-span: all</code>’ had been specified.
<div class=example>
<p>In this example, a commonly used newspaper layout is easily described:
<pre>
body { columns: 3 }
img.A { column-span: 2; width: 100% } /* image spans two columns */
.one { column-span: 2 } /* lead paragraph spans two columns */
</pre>
<img alt="sample rendering" src=regions.png></div>
<p>Further, the ‘<code class=property>page</code>’ value is added to
‘<code class=property>column-span</code>’ so that the page (and not
the column or element) becomes the reference.
<div class=example>
<p>In this example, the footer is floated to the bottom of the last page
(and not the bottom of the article element):
<pre>
footer { float: bottom; column-span: page }
<article>
...
<footer>...<.footer>
</article>
</pre>
</div>
<p class=issue>An alternative way to express this would be to add a
separate propertye, e.g., <code>float-reference: column | multicol |
page</code>
<h3 id=deferring-floats-float-defer-column-floa><span class=secno>1.3.
</span>Deferring floats: float-defer-column, float-defer-page</h3>
<p>A page float can be deferred to a following column/page with these new
properties:
<h4 id=float-defer-column><span class=secno>1.3.1. </span>‘<a
href="#float-defer-column0"><code
class=property>float-defer-column</code></a>’</h4>
<table class=propdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=float-defer-column0>float-defer-column</dfn>
<tr>
<td><em>Value:</em>
<td><integer> | last | none
<tr>
<td><em>Initial:</em>
<td>none
<tr>
<td><em>Applies to:</em>
<td>page floats
<tr>
<td><em>Inherited:</em>
<td>no
<tr>
<td><em>Percentages:</em>
<td>N/A
<tr>
<td><em>Media:</em>
<td>visual
<tr>
<td><em>Computed value:</em>
<td>specified value
</table>
<h4 id=float-defer-page><span class=secno>1.3.2. </span>‘<a
href="#float-defer-page0"><code
class=property>float-defer-page</code></a>’</h4>
<table class=propdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=float-defer-page0>float-defer-page</dfn>
<tr>
<td><em>Value:</em>
<td><integer> | last | none
<tr>
<td><em>Initial:</em>
<td>none
<tr>
<td><em>Applies to:</em>
<td>page floats
<tr>
<td><em>Inherited:</em>
<td>no
<tr>
<td><em>Percentages:</em>
<td>N/A
<tr>
<td><em>Media:</em>
<td>visual
<tr>
<td><em>Computed value:</em>
<td>specified value
</table>
<p>These properties specify whether page floats should appear in their
natural column/page, or in a following column/page. Values are:
<dl>
<dt>none
<dd>the page float appears in the natural column/page
<dt><integer>
<dd>A positive integer value indicates that the page float should be
displayed in a following column/page. A negative integer value indicates
that the page float should be displayed in a following column/page,
counted from the last column/page. When counting columns, the starting
point is the last column of the multicol element on the natural page.
When counting pages, the starting point is the last page of the multicol
element.
</dl>
<div class=example>
<p>Float figure to the top of the column that follows the natural column:
<pre>
.figure { float: top }
.figure { float-defer-column: 1 }
</pre>
</div>
<div class=example>
<p>Float figure to the top of the next-to-last column:
<pre>
.figure { float: top; float-defer-column: -1 }
</pre>
<img alt="sample rendering" src=7.png></div>
<div class=example>
<p>Float figure to top of the last column of the multicol element on the
current page:
<pre>
.figure { float: top; float-defer-column: last }
</pre>
<img alt="sample rendering" src=6.png></div>
<div class=example>
<p>In combination with ‘<code class=property>column-span</code>’, the
figure is floated to the top corner of the multicol element on that page:
<pre>
.figure { float: top; column-span: 2; float-defer-column: last; width: 100% }
</pre>
<img alt="sample rendering" src=8.png></div>
<div class=example>
<p>Float figure to the top of the second column, spanning two columns:
<pre>
.figure {
float: top; column-span: 2;
float-defer-column: 1;
}
</pre>
<img alt="sample rendering" src=18.png></div>
<div class=example>
<p>Float figure to the top right, leaving one full column:
<pre>
.figure {
float: top; column-span: 2;
float-defer-column: -1;
}
</pre>
<img alt="sample rendering" src=18.png>
<p>Given that there are four columnn, the same layout would be achived
with this code:
<pre>
.figure {
float: top; column-span: 2;
float-defer-column: 1;
}
</pre>
</div>
<div class=example>
<p>Float figure to the top of the first column on the next-to-last page:
<pre>
.figure { float: top }
.figure { float-defer-page: -1 }
</pre>
</div>
<div class=example>
<p>Float figure to the top of the next-to-last column on the next-to-last
page:
<pre>
.figure { float: top }
.figure { float-defer-column: -1 }
.figure { float-defer-page: -1 }
</pre>
</div>
<dl>
<dt>last
<dd>The page float should be displayed in the last colum, or on the last
page.
<div class=example>
<p>Float figure to the top of the last column on the natural page:
<pre>
.figure { float: top }
.figure { float-defer-column: last }
</pre>
<img alt="sample rendering" src=6.png></div>
<div class=example>
<p>Float figure to the last column on the last page:
<pre>
.figure { float: top }
.figure { float-defer-column: last }
.figure { float-defer-page: last }
</pre>
</div>
<dt>none
<dd>The page floats should appear in their natural column/page, if
possible.
</dl>
<p>Zero is not a legal value.
<h3 id=clearing-page-floats><span class=secno>1.4. </span>Clearing page
floats</h3>
<p>Page floats may request to not be stacked, or to be the only page float
on a page/column through new values on the ‘<code
class=property>clear</code>’ property:
<dl>
<dt>top/bottom
<dd>The page float requests to be the only page float at the top/bottom of
the column. If there is already a page float at the requested position,
the page float is moved to the next column which does not have a page
float in the requested position.
<dt>column
<dd>The page float requests to be the only page float in the column. If
there is already another page float on the page, the page float is moved
to the next page which does not have a page float.
<dt>page
<dd>The page float requests to be the only page float on the page. If
there is already another page float on the page, the page float is moved
to the next page which does not have a page float.
</dl>
<div class=example>
<p>In this example, the two figures may appear in the same column:
<pre>
.figure { float: bottom; clear: none }
<div class=figure></div>
<div class=figure></div>
</pre>
<img src=16.png></div>
<div class=example>
<p>In this example, the two figures will appear in different columns:
<pre>
.figure { float: bottom; clear: column }
<div class=figure></div>
<div class=figure></div>
</pre>
<img src=17.png></div>
<div class=example>
<p>In this example, the two figures may appear at the bottom of the same
column due to clearing only at the top:
<pre>
.figure { float: bottom; clear: top }
<div class=figure></div>
<div class=figure></div>
</pre>
<img src=16.png></div>
<div class=example>
<p>In this example, the two figures will appear in different columns due
to clearing at the bottom:
<pre>
.figure { float: bottom; clear: bottom }
<div class=figure></div>
<div class=figure></div>
</pre>
<img src=17.png></div>
<div class=example>
<p>In this example, the two figures end up the top corner of two different
pages:
<pre>
.figure { float: top; float-defer-column: last; clear: page }
<div class=figure></div>
<div class=figure></div>
</pre>
</div>
<div class=example>
<p>In this example, the two figures request different positions, and they
may therefore end up in the same column:
<pre>
.figure.one { float: top; clear: top }
.figure.two { float: bottom; clear: bottom }
<div class="figure one"></div>
<div class="figure two"></div>
</pre>
</div>
<h3 id=floating-inside-and-outside-pages><span class=secno>1.5.
</span>Floating inside and outside pages</h3>
<p>Two allow content to flow to the inside and outside of a page, these
keywords are added to the ‘<code class=property>float</code>’
property:
<dl>
<dt>inside
<dd>On a right page, this value is synonymous with ‘<code
class=property>left</code>’. On a left page, this value is synonymous
with ‘<code class=property>right</code>’.
<dt>outside
<dd>On a left page, this value is synonymous with ‘<code
class=property>left</code>’, On a right page, this value is synonymous
with ‘<code class=property>right</code>’.
</dl>
<p>These new values do not create page floats, the are simply aliases for
‘<code class=property>left</code>’ and ‘<code
class=property>right</code>’.
<div class=example>
<pre>
.figure { float: outside }
</pre>
</div>
<p class=issue>Should there be a way to combine float: top/bottom with
left/right?
<p class=issue>Should there be a way to delete page floats that end up
lonesome on pages?
<h3 id=wrapping-around-page-floats><span class=secno>1.6. </span>Wrapping
around page floats</h3>
<table class=propdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=float-wrap>float-wrap</dfn>
<tr>
<td><em>Value:</em>
<td>none | wrap
<tr>
<td><em>Initial:</em>
<td>none
<tr>
<td><em>Applies to:</em>
<td>page floats
<tr>
<td><em>Inherited:</em>
<td>no
<tr>
<td><em>Percentages:</em>
<td>N/A
<tr>
<td><em>Media:</em>
<td>visual
<tr>
<td><em>Computed value:</em>
<td>specified value
</table>
<p>This property indicates whether other content may wrap around a page
float:
A3BB
<dl>
<dt>none
<dd>other content may not wrap around the page float
<dt>wrap
<dd>other content may wrap around the page float
</dl>
<p>The ‘<code class=property>intrude</code>’ value only works in
combination with one of these keywords: ‘<code
class=property>left</code>’/‘<code
class=property>right</code>’/‘<code
class=property>top</code>’/‘<code
class=property>bottom</code>’/‘<code
class=property>top-corner</code>’/‘<code
class=property>bottom-corner</code>’.
<div class=example>
<pre class=css>
img { float: top; column-span: 2; float-wrap: wrap; width: 120%; }
</pre>
<p>In this example, the image is wider than the column and will therefore
intrude into the neighboring column. At the bottom of the middle column
is a long word that is clipped in the middle of the column gap. <img
alt="sample rendering" src=1.png>
</div>
<h3 id=the-float-offset-property><span class=secno>1.7. </span>The ‘<a
href="#float-offset"><code class=property>float-offset</code></a>’
property</h3>
<table class=propdef>
<tbody>
<tr>
<td><em>Name:</em>
<td><dfn id=float-offset>float-offset</dfn>
<tr>
<td><em>Value:</em>
<td><length> <length> ?
<tr>
<td><em>Initial:</em>
<td>0 0
<tr>
<td><em>Applies to:</em>
<td>floated elements
<tr>
<td><em>Inherited:</em>
<td>no
<tr>
<td><em>Percentages:</em>
<td>see prose
<tr>
<td><em>Media:</em>
<td>visual, paged
<tr>
<td><em>Computed value:</em>
<td>one or two absolute lengths
</table>
<p>This property pushes a float in opposite direction of the where it has
been floated with ‘<code class=property>float</code>’. If one value is
specified, it is the horizontal offset. If two values are specified, the
first is the horizontal and the second is the vertical offset. If no
vertical value has been specified, the vertical offset is set to zero.
<p>This property can only influence a float along an axis it has been
floated.
<div class=example>
<pre>
img {
float: left;
float-offset: 2em 3em;
}
</pre>
<p>In this example, the image is floated to the left. Therefore, ‘<a
href="#float-offset"><code class=property>float-offset</code></a>’ may
only push the element in the horizontal direction, and the vertical value
is ignored.
</div>
<p>Negative values are allowed; a negative values will push the float in
the same direction as it has been floated with ‘<code
class=property>float</code>’
<p>This property may move floats into other column than where they
naturally appear.
<div class=example>
<pre>img {
float: right;
float-offset: 5px;
}
</pre>
<img alt="sample rendering" src=14.png></div>
<p>Percentage values are computed according to this formula:
<pre>
(containing-block-width - float-width) * percentage
(containing-block-height - float-height) * percentage
</pre>
<div class=example> Pull quotes are often centered in a column. In this
example, the pull quote is floated to the right, and then pushed back into
the center. <img src="exclusion_wrap_side_left.png" width=213>
<pre>
.pullquote {
float: right;
float-offset: 50%; /* 50% centers the box */
}
</pre>
</div>
<p>When negative values are set on this property, the column gap is also
part of the calculation:
<pre>
((containing-block-width + 2 * column-gap) - float-width) * percentage
</pre>