-
Notifications
You must be signed in to change notification settings - Fork 791
Expand file tree
/
Copy pathOverview.html
More file actions
1314 lines (984 loc) · 49.9 KB
/
Overview.html
File metadata and controls
1314 lines (984 loc) · 49.9 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 Intrinsic & Extrinsic Sizing Module Level 3 (CSS3 TMPL)</title>
<link href="#contents" rel=contents>
<link href="#index" rel=index>
<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">
<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 Intrinsic & Extrinsic Sizing Module Level 3</h1>
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 13 August 2012</h2>
<dl><!--
<dt>This version:
<dd><a href="http://www.w3.org/TR/2012/ED-css3-sizing-20120813/">http://www.w3.org/TR/2012/ED-css3-sizing-20120813/</a>
-->
<dt>Latest version:
<dd><a
href="http://dev.w3.org/csswg/css3-sizing/">http://dev.w3.org/csswg/css3-sizing/</a>
<dt>Editor's draft:
<dd><a
href="http://dev.w3.org/csswg/css3-sizing/">http://dev.w3.org/csswg/css3-sizing/</a>
<dt>Issue Tracking:
<dd><a
href="https://www.w3.org/Bugs/Public/buglist.cgi?product=CSS&component=Sizing&resolution=---">W3C
Bugzilla</a>
<dt>Feedback:
<dd><a
href="http://lists.w3.org/Archives/Public/www-style/">www-style@w3.org</a>
with subject line “<kbd>[css3-sizing] <var>… message topic
…</var></kbd>”
<dt>Editors:
<dd class=hcard><a class="fn url"
href="http://www.xanthir.com/contact">Tab Atkins Jr.</a>, <span
class=org>Google Inc.</span>
<dd class=hcard><a class="fn url"
href="http://fantasai.inkedblade.net/contact">Elika J. Etemad</a>, <span
class=org>Mozilla</span>
</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>This module extends the CSS sizing properties with keywords that
represent content-based "intrinsic" sizes and context-based "extrinsic"
sizes, allowing CSS to more easily describe boxes that fit their content
or fit into a particular layout context. <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.
<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-sizing%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-sizing” in the subject, preferably like this:
“[<!---->css3-sizing<!---->] <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-->
<p>The following features are at risk: …
<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>
<ul class=toc>
<li><a href="#placement"><span class=secno>1.1. </span> Module
interactions</a>
<li><a href="#values"><span class=secno>1.2. </span> Values</a>
</ul>
<li><a href="#terms"><span class=secno>2. </span> Terminology</a>
<li><a href="#size-keywords"><span class=secno>3. </span> New Sizing
Keywords</a>
<ul class=toc>
<li><a href="#width-height-keywords"><span class=secno>3.1. </span> New
Keywords for ‘<code class=property>width</code>’ and ‘<code
class=property>height</code>’</a>
<li><a href="#the-contain-floats-value"><span class=secno>3.2. </span>
Containing Floats</a>
<li><a href="#column-sizing"><span class=secno>3.3. </span> Column
Sizing Keywords</a>
</ul>
<li><a href="#intrinsic-sizing"><span class=secno>4. </span> Intrinsic
Size Determination</a>
<ul class=toc>
<li><a href="#replaced-intrinsic"><span class=secno>4.1. </span>
Intrinsic Sizes of Replaced Elements</a>
<li><a href="#inline-intrinsic"><span class=secno>4.2. </span> Intrinsic
Sizes of Non-Replaced Inlines</a>
<li><a href="#block-intrinsic"><span class=secno>4.3. </span> Intrinsic
Sizes of Non-Replaced Blocks</a>
<li><a href="#table-intrinsic"><span class=secno>4.4. </span> Intrinsic
Sizes in Table Layout</a>
<li><a href="#multicol-intrinsic"><span class=secno>4.5. </span>
Intrinsic Sizes in Multi-column Layout</a>
</ul>
<li><a href="#extrinsic-sizing"><span class=secno>5. </span> Extrinsic
Size Determination</a>
<li><a href="#conformance"><span class=secno>6. </span> Conformance</a>
<ul class=toc>
<li><a href="#conventions"><span class=secno>6.1. </span> Document
conventions</a>
<li><a href="#conformance-classes"><span class=secno>6.2. </span>
Conformance classes</a>
<li><a href="#partial"><span class=secno>6.3. </span> Partial
implementations</a>
<li><a href="#experimental"><span class=secno>6.4. </span> Experimental
implementations</a>
<li><a href="#testing"><span class=secno>6.5. </span> Non-experimental
implementations</a>
<li><a href="#cr-exit-criteria"><span class=secno>6.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>
</ul>
<!--end-toc-->
<h2 id=intro><span class=secno>1. </span> Introduction</h2>
<p><em>This section is not normative.</em>
<p> CSS layout has several different concepts of automatic sizing that are
used in various layout calculations. This section defines some more
precise terminology to help connect the layout behaviors of this spec to
the calculations used in other modules, and some new keywords for the
‘<code class=property>width</code>’ and ‘<code
class=property>height</code>’ properties to allow authors to assign
elements the dimensions resulting from these size calculations.
<h3 id=placement><span class=secno>1.1. </span> Module interactions</h3>
<p>This module extends the ‘<code class=property>width</code>’,
‘<code class=property>height</code>’, ‘<code
class=property>min-width</code>’, ‘<code
class=property>min-height</code>’, ‘<code
class=property>max-width</code>’, ‘<code
class=property>max-height</code>’, and ‘<code
class=property>column-width</code>’ features defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> chapter 10 and in
[[!CSS3MULTICOL]]
<h3 id=values><span class=secno>1.2. </span> Values</h3>
<p>This specification follows the <a
href="http://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
definition conventions</a> from <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. Value types not defined in
this specification are defined in CSS Level 2 Revision 1 <a
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. Other CSS
modules may expand the definitions of these value types: for example <a
href="#CSS3COLOR" rel=biblioentry>[CSS3COLOR]<!--{{CSS3COLOR}}--></a>,
when combined with this module, expands the definition of the
<color> value type as used in this specification.
<p>In addition to the property-specific values listed in their definitions,
all properties defined in this specification also accept the <a
href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
keyword as their property value. For readability it has not been repeated
explicitly.
<h2 id=terms><span class=secno>2. </span> Terminology</h2>
<dl>
<dt><dfn id=size>size</dfn>
<dd> A one- or two-dimensional measurement: a <a
href="http://www.w3.org/TR/css3-writing-modes/#measure"><i>measure</i></a>
and/or <a
href="http://www.w3.org/TR/css3-writing-modes/#extent"><i>extent</i></a>;
alternatively a width and/or height.
<dt><dfn id=definite-size title="definite|definite size">definite
size</dfn>
<dd> A size that can be determined without measuring content; that is, a
<var><length></var>, a size of the <i>initial containing block</i>, or
a <var><percentage></var> that is resolved against a <a
href="#definite-size"><i>definite</i></a> size.
<dt><dfn id=indefinite-size title="indefinite|indefinite size">indefinite
size</dfn>
<dd> A size that is not <a href="#definite-size"><i>definite</i></a>. An
<a href="#indefinite-size"><i>indefinite</i></a> <a
href="#available-size"><i>available size</i></a> is essentially infinite.
<dt><dfn id=available-size
title="available|available size|available measure|available extent">available
size</dfn>
<dd> The space into which a box is laid out, typically either a
measurement of its <i>containing block</i> or an infinite size. An <a
href="#available-size"><i>available size</i></a> can also be either a
<dfn id=min-content-constraint>min-content constraint</dfn> or a <dfn
id=max-content-constraint>max-content constraint</dfn>.
<dt><dfn id=fallback-size title="fallback|fallback size">fallback
size</dfn>
<dd> Some sizing algorithms do not work well with an infinite size. In
these cases, the fallback size is used instead. Unless otherwise
specified, this is the size of the initial containing block.
<dt><dfn id=fill-available-measure>fill-available measure</dfn>
<dd> Roughly, the measure a box would take if it filled its <a
href="#available-size"><i>available measure</i></a>. (See <a
href="http://dev.w3.org/csswg/css3-sizing/#extrinsic-sizing">Extrinsic
Size Determination</a>.)
<p class=note> Note: This is called the <i>available width</i> in <a
href="http://www.w3.org/TR/CSS21/visudet.html#float-width">CSS2.1§10.3.5</a>
and computed by the rules in <a
href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth">CSS2.1§10.3.3</a>.
<dt><dfn id=max-content-measure>max-content measure</dfn>
<dd> Roughly, the narrowest measure a box could take while fitting around
its contents if <em>none</em> of the soft wrap opportunities within the
box were taken. (See <a
href="http://dev.w3.org/csswg/css3-sizing/#intrinsic-sizing">Intrinsic
Size Determination</a>.)
<p class=note> Note: This is called the <i>preferred width</i> in <a
href="http://www.w3.org/TR/CSS21/visudet.html#float-width">CSS2.1§10.3.5</a>
and the <i>maximum cell width</i> in <a
href="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout">CSS2.1§17.5.2.2</a>.
<dt><dfn id=min-content-measure>min-content measure</dfn>
<dd> The narrowest measure a box could take that doesn't lead to
inline-dimension overflow that could be avoided by choosing a larger
measure. Roughly, the measure that would fit around its contents if
<em>all</em> soft wrap opportunities within the box were taken. (See <a
href="http://dev.w3.org/csswg/css3-sizing/#intrinsic-sizing">Intrinsic
Size Determination</a>.)
<p class=note> Note: This is called the <i>preferred minimum width</i> in
<a
href="http://www.w3.org/TR/CSS21/visudet.html#float-width">CSS2.1§10.3.5</a>
and the <i>minimum content width</i> in <a
href="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout">CSS2.1§17.5.2.2</a>.
<dt><dfn id=fit-content-measure>fit-content measure</dfn>
<dd> If the <a href="#available-size"><i>available</i></a> measure is
finite, equal to <code>min(<a href="#max-content"><i>max-content</i></a>,
max(<a href="#min-content"><i>min-content</i></a>, <a
href="#fill-available"><i>fill-available</i></a>))</code>. Otherwise,
equal to the <a href="#max-content-measure"><i>max-content
measure</i></a>.
<p class=note> Note: This is called the <i>shrink-to-fit</i> width in <a
href="http://www.w3.org/TR/CSS21/visudet.html#float-width">CSS2.1§10.3.5</a>
and <a href="http://www.w3.org/TR/css3-multicol/#pseudo-algorithm">CSS
Multi-column Layout § 3.4</a>.
<dt><dfn id=fill-available-extent>fill-available extent</dfn>
<dd> Roughly, the extent a box would take if it filled its <a
href="#available-size"><i>available extent</i></a>. (See <a
href="http://dev.w3.org/csswg/css3-sizing/#intrinsic-sizing">Intrinsic
Size Determination</a>.)
<dt><dfn id=max-content-extent>max-content extent</dfn>
<dd> Roughly, the extent of the content after layout.
<dt><dfn id=min-content-extent>min-content extent</dfn>
<dd> Equivalent to the <a href="#max-content-extent"><i>max-content
extent</i></a>. <span class=issue>Or should this be the minimum between
allowed break points? It might make sense in multi-col contexts to have
min-content and max-content extents be different, even if they are the
same elsewhere.</span>
<dt><dfn id=fit-content-extent>fit-content extent</dfn>
<dd> Analogous to the <a href="#fit-content-measure"><i>fit-content
measure</i></a>.
<dt><dfn id=max-size-contribution>max-size contribution</dfn>
<dd> The size that a box contributes to its containing block's
<i>max-content size</i>.
<dt><dfn id=min-size-contribution>min-size contribution</dfn>
<dd> The size that a box contributes to its containing block's
<i>min-content size</i>.
<dt><dfn id=max-size-constraint>max-size constraint</dfn>
<dd> A sizing constraint imposed by the box's containing block that causes
it to produce its <a href="#max-size-contribution"><i>max-size
contribution</i></a>.
<dt><dfn id=min-size-constraint>min-size constraint</dfn>
<dd> A sizing constraint imposed by the box's containing block that causes
it to produce its <a href="#min-size-contribution"><i>min-size
contribution</i></a>.
</dl>
<h2 id=size-keywords><span class=secno>3. </span> New Sizing Keywords</h2>
<h3 id=width-height-keywords><span class=secno>3.1. </span> New Keywords
for ‘<code class=property>width</code>’ and ‘<code
class=property>height</code>’</h3>
<table class=propdef>
<tbody>
<tr>
<th>Properties:
<td>‘<code class=property>width</code>’, ‘<code
class=property>min-width</code>’, ‘<code
class=property>max-width</code>’, ‘<code
class=property>height</code>’, ‘<code
class=property>min-height</code>’, ‘<code
class=property>max-height</code>’
<tr>
<th>New Values:
<td>‘<a href="#fill-available"><code
class=css>fill-available</code></a>’ | ‘<a
href="#max-content"><code class=css>max-content</code></a>’ | ‘<a
href="#min-content"><code class=css>min-content</code></a>’ | ‘<a
href="#fit-content"><code class=css>fit-content</code></a>’
<tr>
<th>Initial:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> and <a
href="#CSS3-FLEXBOX"
rel=biblioentry>[CSS3-FLEXBOX]<!--{{!CSS3-FLEXBOX}}--></a>
<tr>
<th>Applies to:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Inherited:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Percentages:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Media:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Computed value:
<td>specified value if keyword specified, else as defined in <a
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
</table>
<p>There are four types of automatically-determined sizes in CSS (which are
represented in the width and height properties by the keywords defined
above):
<dl>
<dt><dfn id=fill-available>‘<code
class=css>fill-available</code>’</dfn>
<dd> Use the <a href="#fill-available-measure"><i>fill-available
measure</i></a> or <a href="#fill-available-extent"><i>fill-available
extent</i></a>, as appropriate to the writing mode.
<dt><dfn id=max-content>‘<code class=css>max-content</code>’</dfn>
<dd> Use the <a href="#max-content-measure"><i>max-content measure</i></a>
or <a href="#max-content-extent"><i>max-content extent</i></a>, as
appropriate to the writing mode.
<dt><dfn id=min-content>‘<code class=css>min-content</code>’</dfn>
<dd> Use the <a href="#min-content-measure"><i>min-content measure</i></a>
or <a href="#min-content-extent"><i>min-content extent</i></a>, as
appropriate to the writing mode.
<dt><dfn id=fit-content>‘<code class=css>fit-content</code>’</dfn>
<dd> Use the <a href="#fit-content-measure"><i>fit-content measure</i></a>
or <a href="#fit-content-extent"><i>fit-content extent</i></a>, as
appropriate to the writing mode.
</dl>
<p class=issue> Right now all of these except ‘<a
href="#fill-available"><code class=css>fill-available</code></a>’ mean
the same thing for extents. This may or may not be ideal.
<h3 id=the-contain-floats-value><span class=secno>3.2. </span> Containing
Floats</h3>
<table class=propdef>
<tbody>
<tr>
<th>Properties:
<td>‘<code class=property>min-width</code>’, ‘<code
class=property>min-height</code>’
<tr>
<th>New Value:
<td>‘<a href="#contain-floats"><code
class=css>contain-floats</code></a>’
<tr>
<th>Initial:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> and <a
href="#CSS3-FLEXBOX"
rel=biblioentry>[CSS3-FLEXBOX]<!--{{!CSS3-FLEXBOX}}--></a>
<tr>
<th>Applies to:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Inherited:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Percentages:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Media:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Computed value:
<td>specified value if keyword specified, else as defined in <a
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
</table>
<dl>
<dt><dfn id=contain-floats>‘<code
class=css>contain-floats</code>’</dfn>
<dd> Equivalent to ‘<a href="#min-content"><code
class=css>min-content</code></a>’ except that when applied to the
extent of a block box it forces the inner extent to be large enough to
contain the margin boxes of any floats that originate inside the block
and that participate in the same block formatting context as the block's
immediate contents.
</dl>
<h3 id=column-sizing><span class=secno>3.3. </span> Column Sizing Keywords</h3>
<table class=propdef>
<tbody>
<tr>
<th>Property:
<td>‘<code class=property>column-width</code>’
<tr>
<th>New Values:
<td>‘<a href="#min-content"><code class=css>min-content</code></a>’
| ‘<a href="#max-content"><code class=css>max-content</code></a>’ |
‘<a href="#fill-available"><code
class=css>fill-available</code></a>’ | ‘<a
href="#fit-content"><code class=css>fit-content</code></a>’
<tr>
<th>Initial:
<td>as defined in <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
<tr>
<th>Applies to:
<td>as defined in <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
<tr>
<th>Inherited:
<td>as defined in <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
<tr>
<th>Percentages:
<td>as defined in <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
<tr>
<th>Media:
<td>as defined in <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
<tr>
<th>Computed value:
<td>specified value if keyword specified, else as defined in <a
href="#CSS3COL" rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
</table>
<p>When used as values for <a
href="http://www.w3.org/TR/css3-multicol/#cw">‘<code
class=property>column-width</code>’</a>, the new keywords specify the
optimal column width:
<dl>
<dt>‘<a href="#min-content"><code class=css>min-content</code></a>’
<dd>Specifies the optimal column width as the <a
href="#min-content-measure"><i>min-content measure</i></a> of the
multi-column element's contents.
<dt>‘<a href="#max-content"><code class=css>max-content</code></a>’
<dd>Specifies the optimal column width as the <a
href="#max-content-measure"><i>max-content measure</i></a> of the
multi-column element's contents.
<dt>‘<a href="#fill-available"><code
class=css>fill-available</code></a>’
<dd>Specifies the optimal column width as the <a
href="#fill-available-measure"><i>fill-available measure</i></a> of the
multi-column element.
<dt>‘<a href="#fit-content"><code class=css>fit-content</code></a>’
<dd>Specifies the optimal column width as <code>min(<a
href="#max-content"><i>max-content</i></a>, max(<a
href="#min-content"><i>min-content</i></a>, <a
href="#fill-available"><i>fill-available</i></a>))</code>.
</dl>
<h2 id=intrinsic-sizing><span class=secno>4. </span> Intrinsic Size
Determination</h2>
<p> <dfn id=intrinsic-sizing0>Intrinsic sizing</dfn> determines sizes based
on the contents of an element, without regard for its context.
<h3 id=replaced-intrinsic><span class=secno>4.1. </span> Intrinsic Sizes of
Replaced Elements</h3>
<p> For replaced elements, the <a
href="#min-content"><i>min-content</i></a> and <a
href="#max-content"><i>max-content</i></a> sizes are equivalent and
correspond to the used size of the replaced element according to the
‘<code class=css>auto</code>’ size calculation in the corresponding
dimension. (See <a href="#CSS3-IMAGES"
rel=biblioentry>[CSS3-IMAGES]<!--{{!CSS3-IMAGES}}--></a>.)
<h3 id=inline-intrinsic><span class=secno>4.2. </span> Intrinsic Sizes of
Non-Replaced Inlines</h3>
<p> The <a href="#min-content-measure"><i>min-content measure</i></a> of an
inline box is the length of the largest unbreakable sequence of inline
content. The <i>min-measure contribution</i> of an inline box is its <a
href="#min-content-measure"><i>min-content measure</i></a>, plus any
inline-axis margin, border, and padding adjacent to that sequence.
<p> The <a href="#max-content-measure"><i>max-content measure</i></a> of an
inline box is the length of the largest sequence of inline content on a
single line when only forced line breaks are taken. The <i>max-measure
contribution</i> of an inline box is its <a
href="#max-content-measure"><i>max-content measure</i></a>, plus any
inline-axis margin, border, and padding adjacent to that sequence.
<p> The <a href="#min-content-extent"><i>min-content extent</i></a>, <a
href="#max-content-extent"><i>max-content extent</i></a>, <i>min-extent
contribution</i>, and <i>max-content contribution</i> of an inline box are
the distance from the head edge of the first line box to the foot edge of
the last line box on which the inline appears.
<h3 id=block-intrinsic><span class=secno>4.3. </span> Intrinsic Sizes of
Non-Replaced Blocks</h3>
<p> The <a href="#min-content-measure"><i>min-content measure</i></a> of a
<i>block container box</i> is the largest <i>min-measure contribution</i>
of its in-flow or floated children.
<p> The <a href="#max-content-measure"><i>max-content measure</i></a> of a
<i>block container box</i> is the measure of the box after layout, if all
children are sized under a <a href="#max-size-constraint"><i>max-size
constraint</i></a>.
<p> If the computed measure of a <i>block-level box</i> is ‘<a
href="#min-content"><code class=css>min-content</code></a>’, ‘<a
href="#max-content"><code class=css>max-content</code></a>’, or a <a
href="#definite-size"><i>definite size</i></a>, its <i>min-measure
contribution</i> is that size plus any inline-axis margin, border, and
padding. Otherwise, if the computed measure of the block is ‘<a
href="#fit-content"><code class=css>fit-content</code></a>’, ‘<code
class=css>auto</code>’, or ‘<a href="#fill-available"><code
class=css>fill-available</code></a>’, its <i>min-measure
contribution</i> is its <a href="#min-content-measure"><i>min-content
measure</i></a> plus any inline-axis margin, border, and padding.
<p> If the computed measure of a <i>block-level box</i> is ‘<a
href="#min-content"><code class=css>min-content</code></a>’, ‘<a
href="#max-content"><code class=css>max-content</code></a>’, or a <a
href="#definite-size"><i>definite size</i></a>, its <i>max-measure
contribution</i> is that size plus any inline-axis margin, border, and
padding. Otherwise, if the computed measure of the block is ‘<a
href="#fit-content"><code class=css>fit-content</code></a>’, ‘<code
class=css>auto</code>’, or ‘<a href="#fill-available"><code
class=css>fill-available</code></a>’, its <i>max-measure
contribution</i> is its <a href="#max-content-measure"><i>max-content
measure</i></a> plus any inline-axis margin, border, and padding.
<p> The <a href="#min-content-extent"><i>min-content extent</i></a> and <a
href="#max-content-extent"><i>max-content extent</i></a> of a <i>block
container box</i> is the content extent as defined (for horizontal writing
modes) in <a
href="http://www.w3.org/TR/CSS21/visudet.html#normal-block">CSS2.1§10.6.3</a>
and <a
href="http://www.w3.org/TR/CSS21/tables.html#height-layout">CSS2.1§17.5.3</a>
for elements with ‘<code class=css>height: auto</code>’, and
analogously for vertical writing modes.
<p> The <i>min-extent contribution</i> and <i>max-extent contribution</i>
of a <i>block-level box</i> is the extent of the block after layout, plus
any block-axis margin, border, and padding.
<h3 id=table-intrinsic><span class=secno>4.4. </span> Intrinsic Sizes in
Table Layout</h3>
<p class=issue> ???
<h3 id=multicol-intrinsic><span class=secno>4.5. </span> Intrinsic Sizes in
Multi-column Layout</h3>
<p class=issue> See
http://lists.w3.org/Archives/Public/www-style/2011Apr/0316.html
http://lists.w3.org/Archives/Public/www-style/2011May/0468.html
<p class=issue>This section is under discussion and may be removed
<dl>
<dt>min-content
<dd>The <a href="#min-content"><i>min-content</i></a> measure of the
multi-column element is the <a href="#min-content"><i>min-content</i></a>
measure of the multi-column element's contents.
<dt>max-content
</dl>
<p>For multi-column elements laid out with infinite available measure (see
<a href="#orthogonal-multicol">Multi-column Layout in Orthogonal
Flows</a>), the <a href="#min-content"><i>min-content</i></a> extent is
the extent that would result from taking every permissible pagination
break as a column break, and the <a
href="#max-content"><i>max-content</i></a> extent is the extent that would
result from taking only the forced breaks. For all other multi-column
elements it is, like CSS2.1 block-level boxes, the extent that would be
calculated for an ‘<code class=css>auto</code>’ extent per
[[CSS3MULTICOL]].
<pre>
NOTES FROM ROSSEN:
min-content measure is min(column-width, min-content)
max-content measure is
1. Pass w/ colspans displ: none;
Get width
2. Pass with colspans only in width
Get remaining height
3. Pass w/ spans again using remaining height
Get width
4. Layout in width as final
Will lay out perfectly without colspans; will have some slack but no
overflow when colspans present.
</pre>
<h2 id=extrinsic-sizing><span class=secno>5. </span> Extrinsic Size
Determination</h2>
<p> <dfn id=extrinsic-sizing0>Extrinsic sizing</dfn> determines sizes based
on the context of an element, without regard for its contents.
<p> The inner <a href="#fill-available-measure"><i>fill-available
measure</i></a> of a box is the larger of…
<ul>
<li> Its containing block's computed ‘<code
class=property>min-measure</code>’ if that measure is <a
href="#definite-size"><i>definite</i></a>, or zero otherwise.
<li> The smaller of:
<ul>
<li> Its containing block's computed ‘<code
class=property>max-measure</code>’ if that measure is <a
href="#definite-size"><i>definite</i></a>, or infinity otherwise.
<li> The containing block's computed measure if that is <a
href="#definite-size"><i>definite</i></a>, or its inner <a
href="#fill-available-measure"><i>fill-available measure</i></a>
otherwise.
</ul>
</ul>
<p> …less the box's inline-axis margins, borders, and padding.
<p> The <a href="#fill-available-extent"><i>fill-available extent</i></a>
of a box is defined analogously, but in the other dimension. <!--
dddddddd
TTTTTTTTTTTTTTTTTTTTTTThhhhhhh EEEEEEEEEEEEEEEEEEEEEE d::::::d
T:::::::::::::::::::::Th:::::h E::::::::::::::::::::E d::::::d
T:::::::::::::::::::::Th:::::h E::::::::::::::::::::E d::::::d
T:::::TT:::::::TT:::::Th:::::h EE::::::EEEEEEEEE::::E d:::::d
TTTTTT T:::::T TTTTTT h::::h hhhhh eeeeeeeeeeee E:::::E EEEEEEnnnn nnnnnnnn ddddddddd:::::d
T:::::T h::::hh:::::hhh ee::::::::::::ee E:::::E n:::nn::::::::nn dd::::::::::::::d
T:::::T h::::::::::::::hh e::::::eeeee:::::ee E::::::EEEEEEEEEE n::::::::::::::nn d::::::::::::::::d
T:::::T h:::::::hhh::::::h e::::::e e:::::e E:::::::::::::::E nn:::::::::::::::nd:::::::ddddd:::::d
T:::::T h::::::h h::::::he:::::::eeeee::::::e E:::::::::::::::E n:::::nnnn:::::nd::::::d d:::::d
T:::::T h:::::h h:::::he:::::::::::::::::e E::::::EEEEEEEEEE n::::n n::::nd:::::d d:::::d
T:::::T h:::::h h:::::he::::::eeeeeeeeeee E:::::E n::::n n::::nd:::::d d:::::d
T:::::T h:::::h h:::::he:::::::e E:::::E EEEEEE n::::n n::::nd:::::d d:::::d
TT:::::::TT h:::::h h:::::he::::::::e EE::::::EEEEEEEE:::::E n::::n n::::nd::::::ddddd::::::dd
T:::::::::T h:::::h h:::::h e::::::::eeeeeeee E::::::::::::::::::::E n::::n n::::n d:::::::::::::::::d
T:::::::::T h:::::h h:::::h ee:::::::::::::e E::::::::::::::::::::E n::::n n::::n d:::::::::ddd::::d
TTTTTTTTTTT hhhhhhh hhhhhhh eeeeeeeeeeeeee EEEEEEEEEEEEEEEEEEEEEE nnnnnn nnnnnn ddddddddd ddddd
-->
<h2 id=conformance><span class=secno>6. </span> Conformance</h2>
<h3 id=conventions><span class=secno>6.1. </span> Document conventions</h3>
<p>Conformance requirements are expressed with a combination of descriptive
assertions and RFC 2119 terminology. The key words “MUST”, “MUST
NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
“SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
normative parts of this document are to be interpreted as described in RFC
2119. However, for readability, these words do not appear in all uppercase
letters in this specification.
<p>All of the text of this specification is normative except sections
explicitly marked as non-normative, examples, and notes. <a
href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
<p>Examples in this specification are introduced with the words “for
example” or are set apart from the normative text with
<code>class="example"</code>, like this:
<div class=example>
<p>This is an example of an informative example.</p>
</div>
<p>Informative notes begin with the word “Note” and are set apart from
the normative text with <code>class="note"</code>, like this:
<p class=note>Note, this is an informative note.
<h3 id=conformance-classes><span class=secno>6.2. </span> Conformance
classes</h3>
<p>Conformance to CSS Intrinsic & Extrinsic Sizing Level 3 is defined
for three conformance classes:
<dl>
<dt><dfn id=style-sheet title="style sheet!!as conformance class">style
sheet</dfn>
<dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
style sheet</a>.
<dt><dfn id=renderer>renderer</dfn>
<dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
that interprets the semantics of a style sheet and renders documents that
use them.
<dt><dfn id=authoring-tool>authoring tool</dfn>
<dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
that writes a style sheet.
</dl>
<p>A style sheet is conformant to CSS Intrinsic & Extrinsic Sizing
Level 3 if all of its statements that use syntax defined in this module
are valid according to the generic CSS grammar and the individual grammars
of each feature defined in this module.
<p>A renderer is conformant to CSS Intrinsic & Extrinsic Sizing Level 3
if, in addition to interpreting the style sheet as defined by the
appropriate specifications, it supports all the features defined by CSS
Intrinsic & Extrinsic Sizing Level 3 by parsing them correctly and
rendering the document accordingly. However, the inability of a UA to
correctly render a document due to limitations of the device does not make
the UA non-conformant. (For example, a UA is not required to render color
on a monochrome monitor.)
<p>An authoring tool is conformant to CSS Intrinsic & Extrinsic Sizing
Level 3 if it writes style sheets that are syntactically correct according
to the generic CSS grammar and the individual grammars of each feature in
this module, and meet all other conformance requirements of style sheets
as described in this module.
<h3 id=partial><span class=secno>6.3. </span> Partial implementations</h3>
<p>So that authors can exploit the forward-compatible parsing rules to
assign fallback values, CSS renderers <strong>must</strong> treat as
invalid (and <a
href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
appropriate</a>) any at-rules, properties, property values, keywords, and
other syntactic constructs for which they have no usable level of support.
In particular, user agents <strong>must not</strong> selectively ignore
unsupported component values and honor supported values in a single
multi-value property declaration: if any value is considered invalid (as
unsupported values must be), CSS requires that the entire declaration be
ignored.
<h3 id=experimental><span class=secno>6.4. </span> Experimental
implementations</h3>
<p>To avoid clashes with future CSS features, the CSS2.1 specification
reserves a <a
href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
syntax</a> for proprietary and experimental extensions to CSS.
<p>Prior to a specification reaching the Candidate Recommendation stage in
the W3C process, all implementations of a CSS feature are considered
experimental. The CSS Working Group recommends that implementations use a
vendor-prefixed syntax for such features, including those in W3C Working
Drafts. This avoids incompatibilities with future changes in the draft.
<h3 id=testing><span class=secno>6.5. </span> Non-experimental
implementations</h3>
<p>Once a specification reaches the Candidate Recommendation stage,
non-experimental implementations are possible, and implementors should
release an unprefixed implementation of any CR-level feature they can
demonstrate to be correctly implemented according to spec.
<p>To establish and maintain the interoperability of CSS across
implementations, the CSS Working Group requests that non-experimental CSS
renderers submit an implementation report (and, if necessary, the
testcases used for that implementation report) to the W3C before releasing
an unprefixed implementation of any CSS features. Testcases submitted to
W3C are subject to review and correction by the CSS Working Group.
<p>Further information on submitting testcases and implementation reports
can be found from on the CSS Working Group's website at <a
href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
Questions should be directed to the <a
href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
mailing list.
<h3 id=cr-exit-criteria><span class=secno>6.6. </span> CR exit criteria</h3>
<p class=issue>[Change or remove the following CR exit criteria if the spec
is not a module, but, e.g., a Note or a profile. This text was <a
href="http://www.w3.org/Style/CSS/Tracker/actions/44"> decided on
2008-06-04.</a>]
<p> For this specification to be advanced to Proposed Recommendation, there
must be at least two independent, interoperable implementations of each
feature. Each feature may be implemented by a different set of products,
there is no requirement that all features be implemented by a single
product. For the purposes of this criterion, we define the following
terms:
<dl>
<dt>independent
<dd>each implementation must be developed by a different party and cannot
share, reuse, or derive from code used by another qualifying
implementation. Sections of code that have no bearing on the
implementation of this specification are exempt from this requirement.
<dt>interoperable
<dd>passing the respective test case(s) in the official CSS test suite,
or, if the implementation is not a Web browser, an equivalent test. Every
relevant test in the test suite should have an equivalent test created if
such a user agent (UA) is to be used to claim interoperability. In