-
Notifications
You must be signed in to change notification settings - Fork 791
Expand file tree
/
Copy pathOverview.html
More file actions
2848 lines (2199 loc) · 97.7 KB
/
Overview.html
File metadata and controls
2848 lines (2199 loc) · 97.7 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://www.w3.org/2006/03/hcard"><meta
content="text/html; charset=utf-8" http-equiv=Content-Type>
<title>CSS Exclusions and Shapes Module Level 3</title>
<link href="../shared/style/default.css" rel=stylesheet type="text/css">
<style type="text/css">
.singleImgExample {
display: block;
margin: auto;
}
.example-table {
table-layout: fixed;
width: 100%;
}
.example-table tr td img {
width: 90%;
}
</style>
<link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
type="text/css">
<link href="../shared/style/issues.css" rel=stylesheet type="text/css">
<link href="../shared/style/alternate-spec-style.css" id=st rel=stylesheet
title="alternate spec style" type="text/css">
<body>
<div class=head id=div-head>
<p><a href="http://www.w3.org/"><img alt=W3C height=53 id=mobile-logo
src="http://www.w3.org/2008/site/images/logo-w3c-mobile-lg" width=90></a>
<!--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--></p>
<h1 id=css-exclusions-module>CSS Exclusions and Shapes Module Level 3</h1>
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 27 April 2012</h2>
<dl>
<dt>This version:
<dd><a
href="http://dev.w3.org/csswg/css3-exclusions/">http://dev.w3.org/csswg/css3-exclusions/</a></dd>
<!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-exclusions-20120427/">http://www.w3.org/TR/2012/WD-css3-exclusions-20120427/</a></dd>-->
<dt>Latest version:
<dd><a
href="http://www.w3.org/TR/css3-exclusions/">http://www.w3.org/TR/css3-exclusions/</a>
<dt>Editor's Draft:
<dd><a
href="http://dev.w3.org/csswg/css3-exclusions/">http://dev.w3.org/csswg/css3-exclusions/</a>
<dt>Previous version:
<dd>None
<dt>Editors:
<dd class=vcard><span class=fn>Vincent Hardy</span>, <span
class=org>Adobe Systems, Inc.</span>, <span
class=email>vhardy@adobe.com</span>
<dd class=vcard><span class=fn>Rossen Atanassov</span>, <span
class=org>Microsoft Corporation</span>, <span
class=email>ratan@microsoft.com</span>
<dd class=vcard><span class=fn>Alan Stearns</span>, <span class=org>Adobe
Systems, Inc.</span>, <span class=email>stearns@adobe.com</span>
<dt>Issues List:
<dd><a
href="https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&product=CSS&component=Exclusions&resolution=---&cmdtype=doit">in
Bugzilla</a>
<dt>Discussion:
<dd><a
href="http://lists.w3.org/Archives/Public/www-style/">www-style@w3.org</a>
with subject line "<code>[css3-exclusions] message topic</code>"
</dl>
<!--begin-copyright-->
<p class=copyright><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
rel=license>Copyright</a> © 2012 <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>), 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> CSS Exclusions define arbitrary areas around which <a
href="http://www.w3.org/TR/CSS2/visuren.html#inline-boxes">inline
content</a> (<a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>) content can flow. CSS
Exclusions can be defined on any CSS block-level elements. CSS Exclusions
extend the notion of content wrapping previously limited to floats.
<p>CSS Shapes control the geometric shapes used for wrapping inline flow
content outside or inside an element. CSS Shapes can be applied to any
element. A circle shape on a float will cause inline content to wrap
around the circle shape instead of the float's bounding box.
<p>Combining CSS Exclusions and CSS Shapes allows sophisticated layouts,
allowing interactions between shapes in complex positioning schemes.
<h2 class="no-num no-toc" id=status>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=%5Bcss3-exclusions%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
“css3-exclusions” in the subject, preferably like this:
“[<!---->css3-exclusions<!---->] <em>…summary of
comment…</em>”
<p>This document was produced by the <a href="/Style/CSS/members">CSS
Working Group</a> (part of the <a href="/Style/">Style Activity</a>).
<p>This document was produced by a group operating under the <a
href="/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent
Policy</a>. W3C maintains a <a href="/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="/Consortium/Patent-Policy-20040205/#def-essential">Essential
Claim(s)</a> must disclose the information in accordance with <a
href="/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the
W3C Patent Policy</a>.</p>
<!--end-status-->
<h2 class="no-num no-toc" id=contents>Table of contents</h2>
<!--begin-toc-->
<ul class=toc>
<li><a href="#intro"><span class=secno>1. </span>Introduction</a>
<li><a href="#definitions"><span class=secno>2. </span>Definitions</a>
<li><a href="#exclusions"><span class=secno>3. </span>Exclusions</a>
<ul class=toc>
<li><a href="#declaring-exclusions"><span class=secno>3.1.
</span>Declaring exclusions</a>
<ul class=toc>
<li><a href="#wrap-flow-property"><span class=secno>3.1.1. </span>The
‘<code class=property>wrap-flow</code>’ property</a>
</ul>
<li><a href="#scope-and-effect-of-exclusions"><span class=secno>3.2.
</span>Scope and effect of exclusions</a>
<ul class=toc>
<li><a href="#wrap-margin-property"><span class=secno>3.2.1.
</span>The ‘<code class=property>wrap-margin</code>’
property</a>
<li><a href="#wrap-padding-property"><span class=secno>3.2.2.
</span>The ‘<code class=property>wrap-padding</code>’
Property</a>
</ul>
<li><a href="#propagation-of-exclusions"><span class=secno>3.3.
</span>Propagation of Exclusions</a>
<ul class=toc>
<li><a href="#wrap-through-property"><span class=secno>3.3.1.
</span>The ‘<code class=property>wrap-through</code>’
Property</a>
<li><a href="#wrap-shorthand-property"><span class=secno>3.3.2.
</span>The ‘<code class=property>wrap</code>’ Shorthand
Property</a>
</ul>
<li><a href="#exclusions-order"><span class=secno>3.4. </span>Exclusions
order</a>
<li><a href="#exclusions-processing-model"><span class=secno>3.5.
</span>Processing model</a>
<ul class=toc>
<li><a href="#exclusions-processing-model-description"><span
class=secno>3.5.1. </span>Description</a>
<li><a
href="#step-1-resolve-exclusion-boxes-belonging-to-each-wrapping-context"><span
class=secno>3.5.2. </span>Step 1: resolve exclusion boxes belonging
to each <span>wrapping context</span></a>
<li><a
href="#step-2-resolve-wrapping-contexts-layout-containing-blocks"><span
class=secno>3.5.3. </span>Step 2: resolve wrapping contexts and
layout containing blocks</a>
<li><a href="#step-2-A-resolve-exclusions-position-and-size"><span
class=secno>3.5.4. </span>Step 2-A: resolve the position and size of
exclusion boxes</a>
<li><a
href="#step-2-B-layout-containing-block-applying-wrapping"><span
class=secno>3.5.5. </span>Step 2-B: layout containing block applying
wrapping</a>
<li><a href="#exclusions-processing-model-example"><span
class=secno>3.5.6. </span>Example</a>
<ul class=toc>
<li><a href="#step-1-resolve-exclusion-boxes-belonging"><span
class=secno>3.5.6.1. </span>Step 1: resolve exclusion boxes
belonging to each <span>wrapping context</span></a>
<li><a href="#step-2-resolve-wrapping-contexts-and-lay"><span
class=secno>3.5.6.2. </span>Step 2: resolve wrapping contexts and
layout containing blocks</a>
<ul class=toc>
<li><a href="#resolving-rwc-1"><span class=secno>3.5.6.2.1.
</span>Resolving RWC-1</a>
<li><a href="#resolving-rwc-2"><span class=secno>3.5.6.2.2.
</span>Resolving RWC-2</a>
</ul>
</ul>
</ul>
<li><a href="#floats-and-exclusions"><span class=secno>3.6.
</span>Floats and exclusions</a>
<ul class=toc>
<li><a href="#floats-and-exclusions-similarities"><span
class=secno>3.6.1. </span>Similarities</a>
<li><a href="#floats-and-exclusions-differences"><span
class=secno>3.6.2. </span>Differences</a>
<li><a href="#floats-and-exclusions-interoperability"><span
class=secno>3.6.3. </span>Interoperability</a>
<ul class=toc>
<li><a href="#effect-of-floats-on-exclusions"><span
class=secno>3.6.3.1. </span>Effect of floats on exclusions</a>
<li><a href="#effect-of-exclusions-on-floats"><span
class=secno>3.6.3.2. </span>Effect of exclusions on floats</a>
</ul>
</ul>
</ul>
<li><a href="#shapes"><span class=secno>4. </span>Shapes</a>
<ul class=toc>
<li><a href="#relation-to-box-model-and-float-behavior"><span
class=secno>4.1. </span>Relation to the box model and float
behavior</a>
<li><a href="#shapes-from-svg-syntax"><span class=secno>4.2.
</span>Shapes from SVG Syntax</a>
<ul class=toc>
<li><a href="#supported-svg-shapes"><span class=secno>4.2.1.
</span>Supported SVG Shapes</a>
<li><a href="#referencing-svg-shapes"><span class=secno>4.2.2.
</span>Referencing SVG shapes</a>
</ul>
<li><a href="#shapes-from-image"><span class=secno>4.3. </span>Shapes
from Image</a>
<li><a href="#declaring-shapes"><span class=secno>4.4. </span>Declaring
Shapes</a>
<ul class=toc>
<li><a href="#shape-outside-property"><span class=secno>4.4.1.
</span>The ‘<code class=property>shape-outside</code>’
Property</a>
<li><a href="#shape-inside-property"><span class=secno>4.4.2.
</span>The ‘<code class=property>shape-inside</code>’
Property</a>
<li><a href="#shape-image-threshold-property"><span class=secno>4.4.3.
</span>The ‘<code
class=property>shape-image-threshold</code>’ Property</a>
</ul>
</ul>
<li><a href="#conformance"><span class=secno>5. </span>Conformance</a>
<ul class=toc>
<li><a href="#conventions"><span class=secno>5.1. </span>Document
Conventions</a>
<li><a href="#conformance-classes"><span class=secno>5.2.
</span>Conformance Classes</a>
<li><a href="#partial"><span class=secno>5.3. </span> Partial
Implementations</a>
<li><a href="#experimental"><span class=secno>5.4. </span> Experimental
Implementations</a>
<li><a href="#testing"><span class=secno>5.5. </span> Non-Experimental
Implementations</a>
<li><a href="#cr-exit-criteria"><span class=secno>5.6. </span> CR Exit
Criteria</a>
</ul>
<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>
<li class=no-num><a href="#change-log">Change Log</a>
<ul class=toc>
<li><a href="#since-december-13th-2011"><span class=secno>5.7.
</span>Since December 13th 2011</a>
</ul>
</ul>
<!--end-toc-->
<h2 id=intro><span class=secno>1. </span>Introduction</h2>
<p><em>This section is not normative.</em>
<p> The exclusions section of this specification defines features that
allow inline flow content to wrap around outside the <a
href="#exclusion-area">exclusion area</a> of elements.
<p> The shapes section of the specification defines properties to control
the geometry of an element's <a href="#exclusion-area">exclusion area</a>
as well as the geometry used for wrapping an element's inline flow
content.
<h2 id=definitions><span class=secno>2. </span>Definitions</h2>
<p><dfn id=exclusion-box>Exclusion box</dfn>
<p> A <a href="http://www.w3.org/TR/css3-box/">box</a> (<a href="#CSS3BOX"
rel=biblioentry>[CSS3BOX]<!--{{!CSS3BOX}}--></a>) that defines an <a
href="#exclusion-area">exclusion area</a> for other boxes. The ‘<a
href="#wrap-flow"><code class=property>wrap-flow</code></a>’
property is used to make an element's generated box an exclusion box. An
exclusion box contributes its <a href="#exclusion-area">exclusion area</a>
to its <a
href="http://www.w3.org/TR/CSS2/visudet.html#containing-block-details">
containing block's</a> <a href="#wrapping-context">wrapping context</a>.
An element with a ‘<code class=property>float</code>’ computed
value other than ‘<code class=property>none</code>’ does not
become an exclusion.
<p><dfn id=exclusion-area>Exclusion area</dfn>
<div class=issue-marker data-bug_id=15087 data-bug_status=NEW> <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15087">Bug-15087</a>
<div class=issue-details>
<p class=short-desc>Interaction of floats and exclusions (Howcome's
questions)</p>
</div>
</div>
<p> The area used for excluding inline flow content around an exclusion
element. The exclusion area is equivalent to the <a
href="http://www.w3.org/TR/CSS2/box.html#box-dimensions"> border box</a>.
This specification's ‘<a href="#shape-outside"><code
class=property>shape-outside</code></a>’ property can be used to
define arbitrary, non-rectangular exclusion areas.
<p><dfn id=float-area>Float area</dfn>
<p> The area used for excluding inline flow content around a float element.
By default, the float area is the float element's <a
href="http://www.w3.org/TR/CSS2/box.html#box-dimensions">margin box</a>.
This specification's ‘<a href="#shape-outside"><code
class=property>shape-outside</code></a>’ property can be used to
define arbitrary, non-rectangular float areas.
<p><dfn id=exclusion-element>Exclusion element</dfn>
<p>An block-level element which is not a float and generates an <a
href="#exclusion-box">exclusion box</a>. An element generates an exclusion
box when its ‘<a href="#wrap-flow"><code
class=property>wrap-flow</code></a>’ property's computed value is
not ‘<code class=property>auto</code>’.
<p><dfn id=wrapping-context>Wrapping context</dfn>
<div class=issue-marker data-bug_id=15086 data-bug_status=NEW> <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15086">Bug-15086</a>
<div class=issue-details>
<p class=short-desc>should the wrapping context be generic and include
floats?</p>
</div>
</div>
<p> The <a href="#wrapping-context">wrapping context</a> of a box is a
collection of <a href="#exclusion-area">exclusion areas</a> contributed by
its associated <a href="#exclusion-box">exclusion boxes</a>. During
layout, a box wraps its inline flow content in the area that corresponds
to the subtraction of its <a href="#wrapping-context">wrapping context</a>
from its own <a href="#content-area">content area</a>.
<p> A box inherits its <a
href="http://www.w3.org/TR/CSS2/visudet.html#containing-block-details">containing
block's</a> <a href="#wrapping-context">wrapping context</a> unless it
specifically resets it using the ‘<a href="#wrap-through"><code
class=property>wrap-through</code></a>’ property.
<p><dfn id=content-area>Content area</dfn>
<p> The area used for layout of the inline flow content of a box. By
default the area is equivalent to the <a
href="http://www.w3.org/TR/CSS2/box.html#box-dimensions">content box</a>.
This specification's ‘<a href="#shape-inside"><code
class=property>shape-inside</code></a>’ property can define
arbitrary, non-rectangular content areas.
<div class=issue-marker data-bug_id=15089 data-bug_status=NEW> <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15089">Bug-15089</a>
<div class=issue-details>
<p class=short-desc>shrink-to-fit circle / shape</p>
</div>
</div>
<p><dfn id=outside-and-inside title=outside-inside>Outside and inside</dfn>
<p> In this specification, ‘<code
class=property>outside</code>’ refers to DOM content that is not a
descendant of an element while ‘<code
class=property>inside</code>’ refers to the element's descendants.
<h2 id=exclusions><span class=secno>3. </span>Exclusions</h2>
<p> Exclusion elements define exclusion areas that contribute to their
containing block's <a href="#wrapping-context">wrapping context</a>. As a
consequence, exclusions impact the layout of their containing block's
descendants.
<p>
<p> Elements layout their inline content in their <a
href="#content-area">content area</a> and wrap around the areas in their
associated <a href="#wrapping-context">wrapping context</a>. If the
element is itself an exclusion, it does not wrap around its own exclusion
shape and the impact of other exclusions on other exclusions is controlled
by the ‘<code class=property>z-index</code>’ property as
explained in the <a href="#exclusions-order">exclusions order</a> section.
<p> The <a href="#shapes">shape properties</a> can be used to change the
shape of <a href="#exclusion-area">exclusion areas</a>.
<h3 id=declaring-exclusions><span class=secno>3.1. </span>Declaring
exclusions</h3>
<p> An element becomes an exclusion when its ‘<a
href="#wrap-flow"><code class=property>wrap-flow</code></a>’
property has a computed value other than ‘<code
class=property>auto</code>’.
<h4 id=wrap-flow-property><span class=secno>3.1.1. </span>The ‘<a
href="#wrap-flow"><code class=property>wrap-flow</code></a>’
property</h4>
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=wrap-flow title="'wrap-flow'">wrap-flow</dfn>
<tr>
<th>Value:
<td><var>auto</var> | <var>both</var> | <var>start</var> |
<var>end</var> | <var>maximum</var> | <var>clear</var>
<tr>
<th>Initial:
<td>auto
<tr>
<th>Applies to:
<td>block-level elements.
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified except for element's whose ‘<code
class=property>float</code>’ computed value is not <code
class=css>none</code>, in which case the computed value is ‘<code
class=property>auto</code>’.
</table>
<div class=issue-marker data-bug_id=16437 data-bug_status=ASSIGNED> <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16437">Bug-16437</a>
<div class=issue-details>
<p class=short-desc>Consistent use of start/end/top/bottom</p>
</div>
</div>
<p>The values of this property have the following meanings:
<dl>
<dt><dfn id=auto title="'wrap-flow'!!'auto'">auto</dfn>
<dd> No exclusion is created. Inline flow content interacts with the
element as usual. In particular, if the element is a <a
href="http://www.w3.org/TR/CSS2/visuren.html#floats">float</a> (see <a
href="#CSS21" rel=biblioentry>[CSS21]<!--{{CSS21}}--></a>), the behavior
is unchanged.
<dt><dfn id=both title="'wrap-flow'!!'both'">both</dfn>
<dd> Inline flow content can flow on all sides of the exclusion.
<dt><dfn id=start title="'wrap-flow'!!'start'">start</dfn>
<dd> Inline flow content can flow before the start edge of the exclusion
area but must leave the area after the end edge of the exclusion empty.
<dt><dfn id=end title="'wrap-flow'!!'end'">end</dfn>
<dd> Inline flow content can flow after the end edge of the exclusion area
but must leave the area before the start edge of the exclusion empty.
<dt><dfn id=maximum title="'wrap-flow'!!'maximum'">maximum</dfn>
<dd> Inline flow content can flow on the edge of the exclusion with the
largest available space for the given line, and must leave the other edge
of the exclusion empty.
<dt><dfn id=clear title="'wrap-flow'!!'clear'">clear</dfn>
<dd> Inline flow content can only flow on top and bottom edges of the
exclusion and must leave the areas before the start and after the end
edges of the exclusion empty.
</dl>
<p> If the property's computed value is ‘<code
class=property>auto</code>’, the element does not become an
<span>exclusion</span>.
<p> Otherwise, a computed ‘<a href="#wrap-flow"><code
class=property>wrap-flow</code></a>’ property value of ‘<code
class=property>both</code>’, ‘<code
class=property>start</code>’, ‘<code
class=property>end</code>’, ‘<code
class=property>maximum</code>’ or ‘<code
class=property>clear</code>’ on an element makes that element an
<span>exclusion element. It's <span>exclusion shape</span> is contributed
to its containing block's <a href="#wrapping-context">wrapping
context</a>, causing the containing block's descendants to wrap around its
exclusion area. </span>
<p>An <a href="#exclusion-element">exclusion element</a> establishes a new
<a href="">block formatting context</a> (see <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>) for its content.
<div class=figure> <img
alt="General illustration showing how exclusions combine"
src="images/exclusions-illustration.png" width="70%">
<p class=caption>Combining exclusions</p>
</div>
<p> The above figure illustrates how exclusions are combined. The outermost
box represents an element's content box. The A, B, C and D darker gray
boxes represent exclusions in the element's <a
href="#wrapping-context">wrapping context</a>. A, B, C and D have their
respective ‘<a href="#wrap-flow"><code
class=property>wrap-flow</code></a>’ set to ‘<code
class=property>both</code>’, ‘<code
class=property>start</code>’, ‘<code
class=property>end</code>’ and ‘<code
class=property>clear</code>’ respectively. The lighter gray areas
show the additional areas that are excluded for inline layout as a result
of the ‘<a href="#wrap-flow"><code
class=property>wrap-flow</code></a>’ value. For example, the area to
the right of ‘<code class=property>B</code>’ cannot be used
for inline layout because the ‘<a href="#wrap-flow"><code
class=property>wrap-flow</code></a>’ for ‘<code
class=property>B</code>’ is ‘<code
class=property>start</code>’.
<p> The background ‘<code class=property>blue</code>’ area
shows what areas are available for the element's inline content layout.
All areas represented with a light or dark shade of gray are not available
for inline content layout.
<div class="issue-marker wrapper">
<div class=issue-marker data-bug_id=15088 data-bug_status=FIXED> <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15088">Bug-15088</a>
<div class=issue-details>
<p class=short-desc>Add an example with auto-height content and z-index
for exclusions order.</p>
</div>
</div>
<div class=issue-marker data-bug_id=15084 data-bug_status=NEW> <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15084">Bug-15084</a>
<div class=issue-details>
<p class=short-desc>Fluidity of the layout with respect to different
amounts of content</p>
</div>
</div>
</div>
<div class=example>
<p> The ‘<a href="#wrap-flow"><code
class=property>wrap-flow</code></a>’ property values applied to an
absolutely positioned element.</p>
<code class=html></code>
<pre>
<div id="grid">
<div id="exclusion">Donec metus …</div>
<div id="content">Lorem ipsum…</div>
</div>
<style type="text/css">
#grid {
width: 30em;
height: 30em;
display: grid;
grid-columns: 50% 25% 25%;
grid-rows: 40% 20% 40%;
}
#exclusion {
grid-row: 2;
grid-column: 2;
wrap-flow: <see below>
}
#content {
grid-row: 1;
grid-row-span: 3;
grid-column: 1;
grid-column-span: 3;
}
</style>
</pre>
<p>The following figures illustrate the visual rendering for different
values of the ‘<a href="#wrap-flow"><code
class=property>wrap-flow</code></a>’ property. The gray grid lines
are marking the grid cells. and the blue area is the exclusion box
(positioned by the grid).</p>
<table class=example-table>
<tbody>
<tr>
<td><code class=html>#exclusion{ wrap-flow: auto; }</code>
<td><code class=html>#exclusion{ wrap-flow: both; }</code>
<tr>
<td><img alt="Example rendering for wrap-side: auto"
src="images/exclusion_wrap_side_auto.png">
<td><img alt="Example rendering for wrap-side: both"
src="images/exclusion_wrap_side_both.png">
<tr>
<td><code class=html>#exclusion{ wrap-flow: start; }</code>
<td><code class=html>#exclusion{ wrap-flow: end; }</code>
<tr>
<td><img alt="Example rendering for wrap-side: start"
src="images/exclusion_wrap_side_left.png">
<td><img alt="Example rendering for wrap-side: end"
src="images/exclusion_wrap_side_right.png">
<tr>
<td><code class=html>#exclusion{ wrap-flow: maximum; }</code>
<td><code class=html>#exclusion{ wrap-flow: clear; }</code>
<tr>
<td><img alt="Example rendering for wrap-side: maximum"
src="images/exclusion_wrap_side_maximum.png">
<td><img alt="Example rendering for wrap-side: clear"
src="images/exclusion_wrap_side_clear.png">
</table>
</div>
<!-- End section "wrap-flow Property" -->
<!-- End section "Declaring Exclusions" -->
<h3 id=scope-and-effect-of-exclusions><span class=secno>3.2. </span>Scope
and effect of exclusions</h3>
<p> An <span>exclusion</span> affects the inline flow content descended
from the exclusion's containing blocks (defined in <a
href="http://www.w3.org/TR/CSS2/visudet.html#containing-block-details">
CSS 2.1 10.1</a>) and that of all descendant elements of the same
containing block. All inline flow content inside the containing block of
the exclusions is affected. To stop the effect of exclusions defined
outside an element, the ‘<a href="#wrap-through"><code
class=property>wrap-through</code></a>’ property can be used (see
the <a href="#propagation-of-exclusions">propagation of exclusions</a>
section below).
<p> For exclusions with ‘<code
class=css>position:fixed</code>’, the containing block is that of
the root element.
<h4 id=wrap-margin-property><span class=secno>3.2.1. </span>The ‘<a
href="#wrap-margin"><code class=property>wrap-margin</code></a>’
property</h4>
<p> The ‘<a href="#wrap-margin"><code
class=property>wrap-margin</code></a>’ property can be used to
offset the inline flow content wrapping on the outside of exclusions.
Offsets created by the ‘<a href="#wrap-margin"><code
class=property>wrap-margin</code></a>’ property are offset from the
outside of the exclusion. This property takes on positive values only.
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=wrap-margin title="'wrap-margin'">wrap-margin</dfn>
<tr>
<th>Value:
<td><var><length></var>
<tr>
<th>Initial:
<td>0
<tr>
<th>Applies to:
<td><span>exclusion</span> elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>the absolute length
</table>
<!-- End secion "wrap-margin property" -->
<h4 id=wrap-padding-property><span class=secno>3.2.2. </span>The ‘<a
href="#wrap-padding"><code class=property>wrap-padding</code></a>’
Property</h4>
<p> The ‘<a href="#wrap-padding"><code
class=property>wrap-padding</code></a>’ property can be used to
offset the inline flow content wrapping on the inside of elements. Offsets
created by the ‘<a href="#wrap-padding"><code
class=property>wrap-padding</code></a>’ property are offset from the
<a href="#content-area">content area</a> of the element. This property
takes on positive values only.
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=wrap-padding title="'wrap-padding'">wrap-padding</dfn>
<tr>
<th>Value:
<td><var><length></var>
<tr>
<th>Initial:
<td>0
<tr>
<th>Applies to:
<td><span>exclusion</span> elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>the absolute length
</table>
<!-- End section "wrap-padding property" -->
<div class=note>Note that the ‘<a href="#wrap-padding"><code
class=property>wrap-padding</code></a>’ property affects layout of
content inside the element it applies to while the ‘<a
href="#wrap-margin"><code class=property>wrap-margin</code></a>’
property affects layout of content outside the element.</div>
<!-- End section "Scope and Effect of Exclusions" -->
<h3 id=propagation-of-exclusions><span class=secno>3.3. </span>Propagation
of Exclusions</h3>
<p> By default, an element inherits its parent <a
href="#wrapping-context">wrapping context</a>. In other words it is
subject to the exclusions defined <a href="#outside-and-inside"
title=outside-inside>outside the element. </a>
<p>Setting the ‘<a href="#wrap-through"><code
class=property>wrap-through</code></a>’ property to ‘<code
class=property>none</code>’ prevents an element from inheriting its
parent <a href="#wrapping-context">wrapping context</a>. In other words,
exclusions defined ‘<code class=property>outside</code>’ the
element, have not effect on the element's children layout.
<div class=note> Exclusions defined by an element's descendants still
contribute to their containing block's <a
href="#wrapping-context">wrapping context</a>. If that containing block is
a child of an element with ‘<a href="#wrap-through"><code
class=property>wrap-through</code></a>’ set to none, or the element
itself, then exclusion still have an effect on the children of that
containing block element.</div>
<h4 id=wrap-through-property><span class=secno>3.3.1. </span>The ‘<a
href="#wrap-through"><code class=property>wrap-through</code></a>’
Property</h4>
<div class=issue-marker data-bug_id=15085 data-bug_status=NEW> <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15085">Bug-15085</a>
<div class=issue-details>
<p class=short-desc>do we need wrap-through?</p>
</div>
</div>
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=wrap-through title="'wrap-through'">wrap-through</dfn>
<tr>
<th>Value:
<td><a href="#wrap0"><var>wrap</var></a> | <var>none</var>
<tr>
<th>Initial:
<td>wrap
<tr>
<th>Applies to:
<td>block-level elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
</table>
<p>The values of this property have the following meanings:
<dl>
<dt><dfn id=wrap title="'wrap-through'!!'wrap'">wrap</dfn>
<dd> The element inherits its parent node's <a
href="#wrapping-context">wrapping context</a>. Its descendant inline
content wraps around exclusions defined <a href="#outside-and-inside"
title=outside-inside>outside</a> the element.
</dl>
<dl>
<dt><dfn id=none title="'wrap-through'!!'none'">none</dfn>
<dd> The element does not inherit its parent node's <a
href="#wrapping-context">wrapping context</a>. Its descendants are only
subject to exclusion shapes defined <a href="#outside-and-inside"
title=outside-inside>inside</a> the element.
</dl>
<div class=example>
<p> Using the ‘<a href="#wrap-through"><code
class=property>wrap-through</code></a>’ property to control the
effect of exclusions.</p>
<pre><code class=html>
<style type="text/css">
#grid {
display: grid;
grid-columns: 25% 50% 25%;
grid-rows: 25% 25% 25% 25%;
}
#exclusion {
grid-row: 2;
grid-row-span: 2;
grid-column: 2;
wrap-flow: <see below>
}
#rowA, #rowB {
grid-row-span: 2;
grid-column: 1;
grid-column-span: 3;