-
Notifications
You must be signed in to change notification settings - Fork 709
/
Copy pathOverview.html
909 lines (747 loc) · 70.7 KB
/
Overview.html
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
<!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</title>
<link href=../default.css rel=stylesheet type=text/css>
<link href=../csslogo.ico rel="shortcut icon" type=image/x-icon>
<style>
body {
background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat white;
background-attachment: fixed;
color: black;
font-family: sans-serif;
margin: 0 auto;
max-width: 50em;
padding: 2em 1em 2em 70px;
}
:link { color: #00C; background: transparent }
:visited { color: #609; background: transparent }
a[href]:active { color: #C00; background: transparent }
a[href]:hover { background: #ffa }
a[href] img { border-style: none }
h1, h2, h3, h4, h5, h6 { text-align: left }
h1, h2, h3 { color: #005A9C; }
h1 { font: 170% sans-serif }
h2 { font: 140% sans-serif }
h3 { font: 120% sans-serif }
h4 { font: bold 100% sans-serif }
h5 { font: italic 100% sans-serif }
h6 { font: small-caps 100% sans-serif }
.hide { display: none }
div.head { margin-bottom: 1em }
div.head h1 { margin-top: 2em; clear: both }
div.head table { margin-left: 2em; margin-top: 2em }
p.copyright { font-size: small }
p.copyright small { font-size: small }
pre { margin-left: 2em }
dt { font-weight: bold }
ul.toc, ol.toc {
list-style: none;
}
</style>
</head>
<body class=h-entry>
<div class=head>
<p data-fill-with=logo><a class=logo href=http://www.w3.org/>
<img alt=W3C height=48 src=https://www.w3.org/Icons/w3c_home width=72>
</a>
</p>
<h1 class="p-name no-ref" id=title>CSS Intrinsic & Extrinsic Sizing Module Level 3</h1>
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
<span class=dt-updated><span class=value-title title=20140724>24 July 2014</span></span></span></h2>
<div data-fill-with=spec-metadata><dl>
<dt>This version:
<dd><a class=u-url href=http://dev.w3.org/csswg/css-sizing>http://dev.w3.org/csswg/css-sizing</a>
<dt>Latest version:
<dd><a href=http://www.w3.org/TR/css3-sizing/>http://www.w3.org/TR/css3-sizing/</a>
<dt>Previous Versions:
<dd><dd><a href=http://www.w3.org/TR/2012/WD-css3-sizing-20120927/ rel=previous>http://www.w3.org/TR/2012/WD-css3-sizing-20120927/</a>
<dt>Feedback:
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-sizing%5D%20feedback">www-style@w3.org</a>
with subject line
“<kbd>[css-sizing] <var>… message topic …</var></kbd>”(<a href=http://lists.w3.org/Archives/Public/www-style/ rel=discussion>archives</a>)
<dt>Editors:
<dd><dd class="p-author h-card vcard"><a class="p-name fn u-url url" href=http://xanthir.com/contact/>Tab Atkins</a> (<span class="p-org org">Google</span>)
<dd><dd class="p-author h-card vcard"><a class="p-name fn u-url url" href=http://fantasai.inkedblade.net/contact/>fantasai</a> (<span class="p-org org">Mozilla</span>)
<dt>Issue Tracking:
<dd><a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=CSS&component=Sizing&resolution=---">W3C Bugzilla</a>
</dl>
</div>
<div data-fill-with=warning></div>
<p class=copyright data-fill-with=copyright><a href=http://www.w3.org/Consortium/Legal/ipr-notice#Copyright>Copyright</a> © 2014 <a href=http://www.w3.org/><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href=http://www.csail.mit.edu/><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href=http://www.ercim.eu/><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href=http://www.keio.ac.jp/>Keio</a>, <a href=http://ev.buaa.edu.cn/>Beihang</a>), All Rights Reserved. W3C <a href=http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer>liability</a>, <a href=http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks>trademark</a> and <a href=http://www.w3.org/Consortium/Legal/copyright-documents>document use</a> rules apply.
</p>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled heading" id=abstract><span class=content>Abstract</span></h2>
<div class=p-summary data-fill-with=abstract><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.</p>
<a href=http://www.w3.org/TR/CSS/>CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, in speech, etc.</div>
<h2 class="no-num no-toc no-ref heading settled heading" id=status><span class=content>Status of this document</span></h2>
<div data-fill-with=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-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 “css-sizing” in the subject,
preferably like this:
“[css-sizing] <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>.</div>
<div data-fill-with=at-risk></div>
<h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class=content>Table of Contents</span></h2>
<div data-fill-with=table-of-contents><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 <span class=property data-link-type=propdesc title=width>width</span> and <span class=property data-link-type=propdesc title=height>height</span></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><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><span class=secno>5</span> Extrinsic Size Determination</a>
<li><a href=#acknowledgments><span class=secno></span> Acknowledgments</a>
<li><a href=#conformance><span class=secno></span> Conformance</a>
<ul class=toc>
<li><a href=#conventions><span class=secno></span> Document conventions</a>
<li><a href=#conformance-classes><span class=secno></span> Conformance classes</a>
<li><a href=#partial><span class=secno></span> Partial implementations</a>
<li><a href=#experimental><span class=secno></span> Experimental implementations</a>
<li><a href=#testing><span class=secno></span> Non-experimental implementations</a></ul>
<li><a href=#references><span class=secno></span> References</a>
<ul class=toc>
<li><a href=#normative><span class=secno></span> Normative References</a>
<li><a href=#informative><span class=secno></span> Informative References</a></ul>
<li><a href=#index><span class=secno></span> Index</a>
<li><a href=#property-index><span class=secno></span> Property index</a>
<li><a href=#issues-index><span class=secno></span> Issues Index</a></ul></div>
<h2 class="heading settled heading" data-level=1 id=intro><span class=secno>1 </span><span class=content>
Introduction</span><a class=self-link href=#intro></a></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 <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-width title=width>width</a> and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-height title=height>height</a> properties
to allow authors to assign elements the dimensions resulting from these size calculations.
<h3 class="heading settled heading" data-level=1.1 id=placement><span class=secno>1.1 </span><span class=content>
Module interactions</span><a class=self-link href=#placement></a></h3>
<p>This module extends the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-width title=width>width</a>, <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-height title=height>height</a>, <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-min-width title=min-width>min-width</a>, <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-min-height title=min-height>min-height</a>, <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-max-width title=max-width>max-width</a>, <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-max-height title=max-height>max-height</a>, and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-width title=column-width>column-width</a>
features defined in <a data-biblio-type=normative data-link-type=biblio href=#biblio-css21 title=biblio-css21>[CSS21]</a> chapter 10 and in <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3col title=biblio-css3col>[CSS3COL]</a>
<h3 class="heading settled heading" data-level=1.2 id=values><span class=secno>1.2 </span><span class=content>
Values</span><a class=self-link href=#values></a></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 data-biblio-type=normative data-link-type=biblio href=#biblio-css21 title=biblio-css21>[CSS21]</a>. Value types not defined in
this specification are defined in CSS Level 2 Revision 1 <a data-biblio-type=normative data-link-type=biblio href=#biblio-css21 title=biblio-css21>[CSS21]</a>.
Other CSS modules may expand the definitions of these value types: for
example <a data-biblio-type=informative data-link-type=biblio href=#biblio-css3color title=biblio-css3color>[CSS3COLOR]</a>, when combined with this module, expands the
definition of the <color> value type as used in this specification.</p>
<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 class="heading settled heading" data-level=2 id=terms><span class=secno>2 </span><span class=content>
Terminology</span><a class=self-link href=#terms></a></h2>
<dl data-export="">
<dt><dfn data-dfn-type=dfn data-export="" id=size>size<a class=self-link href=#size></a></dfn>
<dd>
A one- or two-dimensional measurement:
a <i data-link-type=dfn title=block-size>block-size</i> and/or <i data-link-type=dfn title=inline-size>inline-size</i>;
alternatively a width and/or height.
<dt><dfn data-dfn-type=dfn data-export="" id=definite title="definite|definite size">definite size<a class=self-link href=#definite></a></dfn>
<dd>
A size that can be determined without measuring content;
that is, a <var><length></var>,
a size of the <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visudet.html#x1 title="initial containing block">initial containing block</a>,
or a <var><percentage></var> that is resolved against a <a data-link-type=dfn href=#definite title=definite>definite</a> size.
Additionally, the size of the <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#x3 title="containing block">containing block</a> of an absolutely positioned element is always <a data-link-type=dfn href=#definite title=definite>definite</a>
with respect to that element.
<dt><dfn data-dfn-type=dfn data-export="" id=indefinite title="indefinite|indefinite size">indefinite size<a class=self-link href=#indefinite></a></dfn>
<dd>
A size that is not <a data-link-type=dfn href=#definite title=definite>definite</a>.
An <a data-link-type=dfn href=#indefinite title=indefinite>indefinite</a> <a data-link-type=dfn href=#available title="available size">available size</a> is essentially infinite.
<dt><dfn data-dfn-type=dfn data-export="" id=available title="available|available size|available inline-size|available block-size|available space">available size<a class=self-link href=#available></a></dfn>
<dd>
The space into which a box is laid out.
Unless otherwise specified, this is
either a measurement of its <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#x3 title="containing block">containing block</a> (if that is <a data-link-type=dfn href=#definite title=definite>definite</a>)
or an infinite size (when it is <a data-link-type=dfn href=#indefinite title=indefinite>indefinite</a>).
An <a data-link-type=dfn href=#available title="available size">available size</a> can alternatively be either a
<a data-link-type=dfn href=#min-content-constraint title="min-content constraint">min-content constraint</a> or
a <a data-link-type=dfn href=#max-content-constraint title="max-content constraint">max-content constraint</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=fill-available-fit>fill-available fit<a class=self-link href=#fill-available-fit></a></dfn>
<dd>
The <a data-link-type=dfn href=#fill-available-fit title="fill-available fit">fill-available fit</a> into a given size
is that size,
minus the element’s computed margins (not collapsed, treating <span class=css data-link-type=maybe title=auto>auto</span> as zero),
border, and padding in the given dimension.
<p class=note>
Note: This is the formula used to calculate the <span class=css data-link-type=maybe title=auto>auto</span> widths
of non-replaced blocks in normal flow in <a href=http://www.w3.org/TR/CSS21/visudet.html#blockwidth>CSS2.1§10.3.3</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=fallback title="fallback|fallback size">fallback size<a class=self-link href=#fallback></a></dfn>
<dd>
Some sizing algorithms do not work well with an infinite size.
In these cases, the <a data-link-type=dfn href=#fallback title="fallback size">fallback size</a> is used instead.
Unless otherwise specified,
this is the size of the <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visudet.html#x1 title="initial containing block">initial containing block</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=fill-available-inline-size>fill-available inline-size<a class=self-link href=#fill-available-inline-size></a></dfn>
<dd>
Roughly, the <i data-link-type=dfn title=inline-size>inline-size</i> a box would take
if it filled its <a data-link-type=dfn href=#available title="available inline-size">available inline-size</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 “available width” 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 data-dfn-type=dfn data-export="" id=max-content-inline-size title="max-content inline-size|max-content size">max-content inline-size<a class=self-link href=#max-content-inline-size></a></dfn>
<dd>
Roughly, the narrowest <i data-link-type=dfn title=inline-size>inline-size</i> 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 “preferred width” in <a href=http://www.w3.org/TR/CSS21/visudet.html#float-width>CSS2.1§10.3.5</a>
and the “maximum cell width” in <a href=http://www.w3.org/TR/CSS21/tables.html#auto-table-layout>CSS2.1§17.5.2.2</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=min-content-inline-size title="min-content inline-size|min-content size">min-content inline-size<a class=self-link href=#min-content-inline-size></a></dfn>
<dd>
The narrowest <i data-link-type=dfn title=inline-size>inline-size</i> a box could take
that doesn’t lead to inline-dimension overflow
that could be avoided by choosing a larger <i data-link-type=dfn title=inline-size>inline-size</i>.
Roughly, the <i data-link-type=dfn title=inline-size>inline-size</i> 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 “preferred minimum width” in <a href=http://www.w3.org/TR/CSS21/visudet.html#float-width>CSS2.1§10.3.5</a>
and the “minimum content width” in <a href=http://www.w3.org/TR/CSS21/tables.html#auto-table-layout>CSS2.1§17.5.2.2</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=fit-content-inline-size>fit-content inline-size<a class=self-link href=#fit-content-inline-size></a></dfn>
<dd>
If the <a data-link-type=dfn href=#available title=available>available</a> inline-size is finite,
equal to <code>min(<a data-link-type=dfn href=#preferred-inline-size title="preferred inline-size">preferred inline-size</a>, max(<a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a>, <a data-link-type=dfn href=#fill-available-inline-size title="fill-available inline-size">fill-available inline-size</a>))</code>.
Otherwise, equal to the <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a>.
<p class=note>
Note: This is called the “shrink-to-fit” 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 data-dfn-type=dfn data-export="" id=preferred-inline-size>preferred inline-size<a class=self-link href=#preferred-inline-size></a></dfn>
<dd>
A box’s “ideal” <i data-link-type=dfn title=inline-size>inline-size</i>.
Unless otherwise specified, this is the <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=fill-available-block-size>fill-available block-size<a class=self-link href=#fill-available-block-size></a></dfn>
<dd>
Roughly, the <i data-link-type=dfn title=block-size>block-size</i> a box would take
if it filled its <a data-link-type=dfn href=#available title="available block-size">available block-size</a>.
(See <a href=http://dev.w3.org/csswg/css3-sizing/#intrinsic-sizing>Intrinsic Size Determination</a>.)
<dt><dfn data-dfn-type=dfn data-export="" id=max-content-block-size>max-content block-size<a class=self-link href=#max-content-block-size></a></dfn>
<dd>
Roughly, the <i data-link-type=dfn title=block-size>block-size</i> of the content after layout.
<dt><dfn data-dfn-type=dfn data-export="" id=min-content-block-size>min-content block-size<a class=self-link href=#min-content-block-size></a></dfn>
<dd>
Equivalent to the <a data-link-type=dfn href=#max-content-block-size title="max-content block-size">max-content block-size</a>.
<p class=issue id=issue-8e234986><a class=self-link href=#issue-8e234986></a>
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 block-sizes be different,
even if they are the same elsewhere.
<dt><dfn data-dfn-type=dfn data-export="" id=fit-content-block-size>fit-content block-size<a class=self-link href=#fit-content-block-size></a></dfn>
<dd>
Analogous to the <a data-link-type=dfn href=#fit-content-inline-size title="fit-content inline-size">fit-content inline-size</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=preferred-block-size>preferred block-size<a class=self-link href=#preferred-block-size></a></dfn>
<dd>
Equivalent to the <a data-link-type=dfn href=#max-content-block-size title="max-content block-size">max-content block-size</a>.
<p class=issue id=issue-3584239e><a class=self-link href=#issue-3584239e></a>
Same issue as <a data-link-type=dfn href=#min-content-block-size title="min-content block-size">min-content block-size</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=max-content-contribution title="max-content contribution|max-content inline-size contribution|max-content block-size contribution">max-content contribution<a class=self-link href=#max-content-contribution></a></dfn>
<dd>
The size that a box contributes to its <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#x3 title="containing block">containing block</a>’s <a data-link-type=dfn href=#max-content-inline-size title="max-content size">max-content size</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=min-content-contribution title="min-content contribution|min-content inline-size contribution|min-content block-size contribution">min-content contribution<a class=self-link href=#min-content-contribution></a></dfn>
<dd>
The size that a box contributes to its <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#x3 title="containing block">containing block</a>’s <a data-link-type=dfn href=#min-content-inline-size title="min-content size">min-content size</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=preferred-size-contribution>preferred-size contribution<a class=self-link href=#preferred-size-contribution></a></dfn>
<dd>
If the box’s layout mode has a defined <a data-link-type=dfn href=#preferred-size-contribution title="preferred-size contribution">preferred-size contribution</a>, that.
Otherwise, the box’s <a data-link-type=dfn href=#max-content-contribution title="max-content contribution">max-content contribution</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=max-content-constraint>max-content constraint<a class=self-link href=#max-content-constraint></a></dfn>
<dd>
A sizing constraint imposed by the box’s <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#x3 title="containing block">containing block</a>
that causes it to produce its <a data-link-type=dfn href=#max-content-contribution title="max-content contribution">max-content contribution</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=min-content-constraint>min-content constraint<a class=self-link href=#min-content-constraint></a></dfn>
<dd>
A sizing constraint imposed by the box’s <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#x3 title="containing block">containing block</a>
that causes it to produce its <a data-link-type=dfn href=#min-content-contribution title="min-content contribution">min-content contribution</a>.
<dt><dfn data-dfn-type=dfn data-export="" id=preferred-size-constraint>preferred-size constraint<a class=self-link href=#preferred-size-constraint></a></dfn>
<dd>
A sizing constraint imposed by the box’s <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#x3 title="containing block">containing block</a>
that causes it to produce its <a data-link-type=dfn href=#preferred-size-contribution title="preferred-size contribution">preferred-size contribution</a>.
</dl>
<h2 class="heading settled heading" data-level=3 id=size-keywords><span class=secno>3 </span><span class=content>
New Sizing Keywords</span><a class=self-link href=#size-keywords></a></h2>
<h3 class="heading settled heading" data-level=3.1 id=width-height-keywords><span class=secno>3.1 </span><span class=content>
New Keywords for <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-width title=width>width</a> and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-height title=height>height</a></span><a class=self-link href=#width-height-keywords></a></h3>
<table class="definition propdef partial"><tr><th>Name:<td><a class=css-code data-link-type=property href=http://dev.w3.org/csswg/css2/visudet.html#propdef-width title=width>width</a>, <a class=css-code data-link-type=property href=http://dev.w3.org/csswg/css2/visudet.html#propdef-min-width title=min-width>min-width</a>, <a class=css-code data-link-type=property href=http://dev.w3.org/csswg/css2/visudet.html#propdef-max-width title=max-width>max-width</a>, <a class=css-code data-link-type=property href=http://dev.w3.org/csswg/css2/visudet.html#propdef-height title=height>height</a>, <a class=css-code data-link-type=property href=http://dev.w3.org/csswg/css2/visudet.html#propdef-min-height title=min-height>min-height</a>, <a class=css-code data-link-type=property href=http://dev.w3.org/csswg/css2/visudet.html#propdef-max-height title=max-height>max-height</a><tr><th>New values:<td class=prod>fill <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> max-content <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> min-content <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> fit-content</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 data-dfn-for="width min-width max-width height min-height max-height" data-dfn-type=value>
<dt><dfn class=css-code data-dfn-for="width min-width max-width height min-height max-height" data-dfn-type=value data-export="" id="valdef-width min-width max-width height min-height max-height.fill">fill<a class=self-link href=#valdef-width%20min-width%20max-width%20height%20min-height%20max-height.fill></a></dfn>
<dd>
Use the <a data-link-type=dfn href=#fill-available-inline-size title="fill-available inline-size">fill-available inline-size</a> or <a data-link-type=dfn href=#fill-available-block-size title="fill-available block-size">fill-available block-size</a>,
as appropriate to the writing mode.
<dt><dfn class=css-code data-dfn-for="width min-width max-width height min-height max-height" data-dfn-type=value data-export="" id="valdef-width min-width max-width height min-height max-height.max-content">max-content<a class=self-link href=#valdef-width%20min-width%20max-width%20height%20min-height%20max-height.max-content></a></dfn>
<dd>
Use the <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a> or <a data-link-type=dfn href=#max-content-block-size title="max-content block-size">max-content block-size</a>,
as appropriate to the writing mode.
<dt><dfn class=css-code data-dfn-for="width min-width max-width height min-height max-height" data-dfn-type=value data-export="" id="valdef-width min-width max-width height min-height max-height.min-content">min-content<a class=self-link href=#valdef-width%20min-width%20max-width%20height%20min-height%20max-height.min-content></a></dfn>
<dd>
Use the <a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a> or <a data-link-type=dfn href=#min-content-block-size title="min-content block-size">min-content block-size</a>,
as appropriate to the writing mode.
<dt><dfn class=css-code data-dfn-for="width min-width max-width height min-height max-height" data-dfn-type=value data-export="" id="valdef-width min-width max-width height min-height max-height.fit-content">fit-content<a class=self-link href=#valdef-width%20min-width%20max-width%20height%20min-height%20max-height.fit-content></a></dfn>
<dd>
Use the <a data-link-type=dfn href=#fit-content-inline-size title="fit-content inline-size">fit-content inline-size</a> or <a data-link-type=dfn href=#fit-content-block-size title="fit-content block-size">fit-content block-size</a>,
as appropriate to the writing mode.
<dt><dfn class=css-code data-dfn-for="width min-width max-width height min-height max-height" data-dfn-type=value data-export="" id="valdef-width min-width max-width height min-height max-height.repudiate-floats">repudiate-floats<a class=self-link href=#valdef-width%20min-width%20max-width%20height%20min-height%20max-height.repudiate-floats></a></dfn> <span class=issue id=issue-f5f00b2c><a class=self-link href=#issue-f5f00b2c></a>Less stupid name?</span>
<dd>
In the inline axis,
use the larger of the min-content inline-size,
and the fill-available inline-size minus the size of any non-descendant floats in the same formatting context.
(This is similar to the behavior of a box that establishes a formatting context next to a float.)
In the block axis,
this is identical to <span class=css data-link-for=width data-link-type=maybe title=auto>auto</span>.
<p class=issue id=issue-4aee2f40><a class=self-link href=#issue-4aee2f40></a>
Does this value work?
Is it needed?
<a href=http://lists.w3.org/Archives/Public/www-style/2013Feb/0212.html>Feedback from dbaron</a>
</dl>
<p class=issue id=issue-250b0406><a class=self-link href=#issue-250b0406></a>
Right now all of these except <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.fill" title=fill>fill</a> mean the same thing
for block-sizes. This may or may not be ideal.
<p class=issue id=issue-67feae6b><a class=self-link href=#issue-67feae6b></a>
If the inline-size is <span class=css data-link-for=width data-link-type=maybe title=auto>auto</span>,
we could have min-content block-size imply a max-content inline-size,
and vice versa.
<p class=note>
Note that percentages resolved against the intrinsic sizes
(<a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.max-content" title=max-content>max-content</a>, <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.min-content" title=min-content>min-content</a>, <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.fit-content" title=fit-content>fit-content</a>, <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.repudiate-floats" title=repudiate-floats>repudiate-floats</a>)
will compute to <span class=css data-link-for=width data-link-type=maybe title=auto>auto</span>,
<a href=http://www.w3.org/TR/CSS21/visudet.html#the-height-property>as defined by CSS 2.1</a>. <a data-biblio-type=normative data-link-type=biblio href=#biblio-css21 title=biblio-css21>[CSS21]</a>
<h3 class="heading settled heading" data-level=3.2 id=the-contain-floats-value><span class=secno>3.2 </span><span class=content>
Containing Floats</span><a class=self-link href=#the-contain-floats-value></a></h3>
<table class="definition propdef partial"><tr><th>Name:<td><a class=css-code data-link-type=property href=http://dev.w3.org/csswg/css2/visudet.html#propdef-min-width title=min-width>min-width</a>, <a class=css-code data-link-type=property href=http://dev.w3.org/csswg/css2/visudet.html#propdef-min-height title=min-height>min-height</a><tr><th>New values:<td class=prod>contain-floats</table>
<dl>
<dt><dfn class=css-code data-dfn-for="min-width min-height" data-dfn-type=value data-export="" id="valdef-width min-width max-width height min-height max-height.contain-floats">contain-floats<a class=self-link href=#valdef-width%20min-width%20max-width%20height%20min-height%20max-height.contain-floats></a></dfn>
<dd>
Equivalent to <a class=css data-link-for=min-width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.min-content" title=min-content>min-content</a>
except that when applied to the block-size of a block box
it forces the inner block-size 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 class="heading settled heading" data-level=3.3 id=column-sizing><span class=secno>3.3 </span><span class=content>
Column Sizing Keywords</span><a class=self-link href=#column-sizing></a></h3>
<table class="definition propdef partial"><tr><th>Name:<td><a class=css-code data-link-type=property href=http://dev.w3.org/csswg/css-multicol-1/#column-width title=column-width>column-width</a><tr><th>New values:<td class=prod>fill <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> max-content <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> min-content <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> fit-content</table>
<p>When used as values for <a href=http://www.w3.org/TR/css3-multicol/#cw><a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-width title=column-width>column-width</a></a>,
the new keywords specify the optimal column width:
<dl data-dfn-for=column-width data-dfn-type=value>
<dt><dfn class=css-code data-dfn-for=column-width data-dfn-type=value data-export="" id=valdef-column-width.fill>fill<a class=self-link href=#valdef-column-width.fill></a></dfn>
<dd>Specifies the optimal column width as the <a data-link-type=dfn href=#fill-available-inline-size title="fill-available inline-size">fill-available inline-size</a>
of the multi-column element.
<dt><dfn class=css-code data-dfn-for=column-width data-dfn-type=value data-export="" id=valdef-column-width.max-content>max-content<a class=self-link href=#valdef-column-width.max-content></a></dfn>
<dd>Specifies the optimal column width as the <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a>
of the multi-column element’s contents.
<dt><dfn class=css-code data-dfn-for=column-width data-dfn-type=value data-export="" id=valdef-column-width.min-content>min-content<a class=self-link href=#valdef-column-width.min-content></a></dfn>
<dd>Specifies the optimal column width as the <a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a>
of the multi-column element’s contents.
<dt><dfn class=css-code data-dfn-for=column-width data-dfn-type=value data-export="" id=valdef-column-width.fit-content>fit-content<a class=self-link href=#valdef-column-width.fit-content></a></dfn>
<dd>Specifies the optimal column width as
<code>min(<a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a>, max(<a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a>, <a data-link-type=dfn href=#fill-available-inline-size title="fill-available inline-size">fill-available inline-size</a>))</code>.
</dl>
<h2 class="heading settled heading" data-level=4 id=intrinsic><span class=secno>4 </span><span class=content>
Intrinsic Size Determination</span><a class=self-link href=#intrinsic></a></h2>
<p>
<dfn data-dfn-type=dfn data-export="" id=intrinsic-sizing>Intrinsic sizing<a class=self-link href=#intrinsic-sizing></a></dfn> determines sizes based on the contents of an element,
without regard for its context.
<h3 class="heading settled heading" data-level=4.1 id=replaced-intrinsic><span class=secno>4.1 </span><span class=content>
Intrinsic Sizes of Replaced Elements</span><a class=self-link href=#replaced-intrinsic></a></h3>
<p>
For replaced elements,
the <a data-link-type=dfn href=#min-content-inline-size title="min-content size">min-content size</a> and <a data-link-type=dfn href=#max-content-inline-size title="max-content size">max-content size</a> are equivalent
and correspond to the appropriate dimension of the concrete object size returned by
the <a href=http://www.w3.org/TR/css3-images/#default-sizing>default sizing algorithm</a> <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3-images title=biblio-css3-images>[CSS3-IMAGES]</a>
of the element,
calculated with an unconstrained specified size.
<h3 class="heading settled heading" data-level=4.2 id=inline-intrinsic><span class=secno>4.2 </span><span class=content>
Intrinsic Sizes of Non-Replaced Inlines</span><a class=self-link href=#inline-intrinsic></a></h3>
<p>
The <a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a> of an inline box
is the length of the largest unbreakable sequence of inline content.
The <a data-link-type=dfn href=#min-content-contribution title="min-content inline-size contribution">min-content inline-size contribution</a> of an inline box
is its <a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a>,
plus any <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#inline-axis- title=inline-axis>inline-axis</a> margin, border, and padding
adjacent to that sequence.
<p>
The <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</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 <a data-link-type=dfn href=#max-content-contribution title="max-content inline-size contribution">max-content inline-size contribution</a> of an inline box
is its <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a>,
plus any <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#inline-axis- title=inline-axis>inline-axis</a> margin, border, and padding
adjacent to that sequence.
<p>
The <a data-link-type=dfn href=#min-content-block-size title="min-content block-size">min-content block-size</a>, <a data-link-type=dfn href=#max-content-block-size title="max-content block-size">max-content block-size</a>, <a data-link-type=dfn href=#min-content-contribution title="min-content block-size contribution">min-content block-size contribution</a>, and <a data-link-type=dfn href=#max-content-contribution title="max-content block-size contribution">max-content block-size contribution</a> 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 class="heading settled heading" data-level=4.3 id=block-intrinsic><span class=secno>4.3 </span><span class=content>
Intrinsic Sizes of Non-Replaced Blocks</span><a class=self-link href=#block-intrinsic></a></h3>
<p>
The <a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a> of a <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#block-container-box title="block container box">block container box</a>
is the largest <a data-link-type=dfn href=#min-content-contribution title="min-content inline-size contribution">min-content inline-size contribution</a>
of its in-flow or floated children.
<p>
The <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a> of a <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#block-container-box title="block container box">block container box</a>
is the inline-size of the box after layout,
if all children are sized under a <a data-link-type=dfn href=#max-content-constraint title="max-content constraint">max-content constraint</a>.
<p>
If the computed inline-size of a <i data-link-type=dfn title="block-level box">block-level box</i>
is <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.min-content" title=min-content>min-content</a>, <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.max-content" title=max-content>max-content</a>, or a <a data-link-type=dfn href=#definite title="definite size">definite size</a>,
its <a data-link-type=dfn href=#min-content-contribution title="min-content inline-size contribution">min-content inline-size contribution</a>
is that size
plus any <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#inline-axis- title=inline-axis>inline-axis</a> margin, border, and padding.
Otherwise, if the computed inline-size of the block is <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.fit-content" title=fit-content>fit-content</a>, <span class=css data-link-for=width data-link-type=maybe title=auto>auto</span>, or <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.fill" title=fill>fill</a>,
its <a data-link-type=dfn href=#min-content-contribution title="min-content inline-size contribution">min-content inline-size contribution</a>
is its <a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a>
plus any <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#inline-axis- title=inline-axis>inline-axis</a> margin, border, and padding.
<p>
If the computed inline-size of a <i data-link-type=dfn title="block-level box">block-level box</i>
is <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.min-content" title=min-content>min-content</a>, <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.max-content" title=max-content>max-content</a>, or a <a data-link-type=dfn href=#definite title="definite size">definite size</a>,
its <a data-link-type=dfn href=#max-content-contribution title="max-content inline-size contribution">max-content inline-size contribution</a>
is that size
plus any <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#inline-axis- title=inline-axis>inline-axis</a> margin, border, and padding.
Otherwise, if the computed inline-size of the block is <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.fit-content" title=fit-content>fit-content</a>, <span class=css data-link-for=width data-link-type=maybe title=auto>auto</span>, or <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.fill" title=fill>fill</a>,
its <a data-link-type=dfn href=#max-content-contribution title="max-content inline-size contribution">max-content inline-size contribution</a>
is its <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a>
plus any <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#inline-axis- title=inline-axis>inline-axis</a> margin, border, and padding.
<p>
The <a data-link-type=dfn href=#min-content-block-size title="min-content block-size">min-content block-size</a> and <a data-link-type=dfn href=#max-content-block-size title="max-content block-size">max-content block-size</a> of a <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#block-container-box title="block container box">block container box</a>
is the content block-size 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 <a class=css data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-height title=height>height: auto</a>,
and analogously for vertical writing modes.
<p>
The <a data-link-type=dfn href=#min-content-contribution title="min-content block-size contribution">min-content block-size contribution</a> and <a data-link-type=dfn href=#max-content-contribution title="max-content block-size contribution">max-content block-size contribution</a> of a <i data-link-type=dfn title="block-level box">block-level box</i>
is the block-size of the block after layout,
plus any <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#block-axis- title=block-axis>block-axis</a> margin, border, and padding.
<h3 class="heading settled heading" data-level=4.4 id=table-intrinsic><span class=secno>4.4 </span><span class=content>
Intrinsic Sizes in Table Layout</span><a class=self-link href=#table-intrinsic></a></h3>
<p class=issue id=issue-0d1b08c3><a class=self-link href=#issue-0d1b08c3></a>
???
<h3 class="heading settled heading" data-level=4.5 id=multicol-intrinsic><span class=secno>4.5 </span><span class=content>
Intrinsic Sizes in Multi-column Layout</span><a class=self-link href=#multicol-intrinsic></a></h3>
<p>
The <a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a> of a multi-column element
with a computed <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-width title=column-width>column-width</a> not <span class=css data-link-type=maybe title=auto>auto</span>
is the smaller of
its <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-width title=column-width>column-width</a>
and the largest <a data-link-type=dfn href=#min-content-contribution title="min-content inline-size contribution">min-content inline-size contribution</a> of its contents.
<p>
The <a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a> of a multi-column element
with a computed <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-width title=column-width>column-width</a> of <span class=css data-link-type=maybe title=auto>auto</span>
is the largest <a data-link-type=dfn href=#min-content-contribution title="min-content inline-size contribution">min-content inline-size contribution</a> of its contents
multiplied by its <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-count title=column-count>column-count</a>
(treating <span class=css data-link-type=maybe title=auto>auto</span> as <span class=css data-link-type=maybe title=1>1</span>).
<p>
The <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a> of a multi-column element
with unrestrained column heights
and a computed <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-count title=column-count>column-count</a> not <span class=css data-link-type=maybe title=auto>auto</span>
is its <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-count title=column-count>column-count</a>
multiplied by the larger of
its <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-width title=column-width>column-width</a> (treating <span class=css data-link-type=maybe title=auto>auto</span> as 0)
and the largest <a data-link-type=dfn href=#max-content-contribution title="max-content inline-size contribution">max-content inline-size contribution</a> of its contents.
<p>
The <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a> of a multi-column element
with unrestrained column heights
and a computed <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-count title=column-count>column-count</a> of <span class=css data-link-type=maybe title=auto>auto</span>
is its <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-width title=column-width>column-width</a>
multiplied by the number of columns obtained by taking all allowed column breaks <a data-biblio-type=informative data-link-type=biblio href=#biblio-css3-break title=biblio-css3-break>[CSS3-BREAK]</a>.
<p>
The <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a> of a multi-column element
with restrained-height columns (i.e. a specified <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-height title=height>height</a> or <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css2/visudet.html#propdef-max-height title=max-height>max-height</a>, or whichever properties map to the <a data-link-type=dfn title=block-size>block-size</a> of the element)
is the <i data-link-type=dfn title=inline-size>inline-size</i> that would exactly include all of its columns.
It may be approximated by:
<ul>
<li>
Laying out the element with column-spanning elements given 'display: none',
and taking a inline-size that includes all the columns.
<li>
Laying out all of the column-spanning elements into that resulting inline-size,
and taking the resulting block-size.
<li>
Subtracting that resulting block-size from the specified restraint,
laying out the element without column-spanning elements again into this adjusted block-size,
and taking the inline-size of all its columns as its <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a>.
</ul>
<p>
or by some more accurate method.
<p class=note>
This approximation can result in some slack,
but avoids overflow in the most common cases,
where the balanced height of the columns above spanning elements are approximately equal.
<p class=note>
In the common case of no column-spanning elements,
this approximation collapses to simply doing a layout,
and measuring the resulting columns.
<p>
The <a data-link-type=dfn href=#preferred-inline-size title="preferred inline-size">preferred inline-size</a> of a multi-column element
with non-<span class=css data-link-type=maybe title=auto>auto</span> <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-width title=column-width>column-width</a> and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-count title=column-count>column-count</a>
is the product of the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-width title=column-width>column-width</a> and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-multicol-1/#column-count title=column-count>column-count</a>,
plus the appropriate amount of column gaps.
In all other cases,
it is the <a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a>.
<h2 class="heading settled heading" data-level=5 id=extrinsic><span class=secno>5 </span><span class=content>
Extrinsic Size Determination</span><a class=self-link href=#extrinsic></a></h2>
<p>
<dfn data-dfn-type=dfn data-export="" id=extrinsic-sizing>Extrinsic sizing<a class=self-link href=#extrinsic-sizing></a></dfn> determines sizes based on the context of an element,
without regard for its contents.
<p>
The inner <a data-link-type=dfn href=#fill-available-inline-size title="fill-available inline-size">fill-available inline-size</a> of a box is…
<ul>
<li>
If the box is the root or is absolutely-positioned, the inline-size of its containing block, else
<li>
<code>max(<a data-link-type=dfn href=#min-content-inline-size title="min-content inline-size">min-content inline-size</a>|0, min(<a data-link-type=dfn href=#max-content-inline-size title="max-content inline-size">max-content inline-size</a>|infinity, <i data-link-type=dfn title=inline-size>inline-size</i>|<a data-link-type=dfn href=#fill-available-inline-size title="fill-available inline-size">fill-available inline-size</a>))</code>
where the sizes are inner inline-sizes of the element establishing the box’s <a data-link-type=dfn href=http://dev.w3.org/csswg/css2/visuren.html#x3 title="containing block">containing block</a>,
and where the first value is used if it is <a data-link-type=dfn href=#definite title=definite>definite</a> and the second value otherwise.
</ul>
<p>
…less the box’s <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#inline-axis- title=inline-axis>inline-axis</a> margins
(after any <a href=http://www.w3.org/TR/CSS21/box.html#collapsing-margins>margin collapsing</a>, and treating <span class=css data-link-type=maybe title=auto>auto</span> margins as zero),
borders, and padding.
<p>
The <a data-link-type=dfn href=#fill-available-block-size title="fill-available block-size">fill-available block-size</a> of a box is defined analogously,
but in the other dimension.
<p class=issue id=issue-935dd67b><a class=self-link href=#issue-935dd67b></a>
This definition might end up skipping further up the ancestor chain than we’d like in some cases.
<a href=http://lists.w3.org/Archives/Public/www-style/2012Oct/0204.html>Example.</a>
Maybe it should stop at each formatting root, or something similar?
<h2 class="no-num heading settled heading" id=acknowledgments><span class=content>
Acknowledgments</span><a class=self-link href=#acknowledgments></a></h2>
<p>Special thanks go to Aaron Gustafson, L. David Baron
for their contributions to this module.
<h2 class="no-ref no-num heading settled heading" id=conformance><span class=content>
Conformance</span><a class=self-link href=#conformance></a></h2>
<h3 class="no-ref heading settled heading" id=conventions><span class=content>
Document conventions</span><a class=self-link href=#conventions></a></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 data-biblio-type=normative data-link-type=biblio href=#biblio-rfc2119 title=biblio-rfc2119>[RFC2119]</a></p>
<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.</p>
<h3 class="no-ref heading settled heading" id=conformance-classes><span class=content>
Conformance classes</span><a class=self-link href=#conformance-classes></a></h3>
<p>Conformance to this specification
is defined for three conformance classes:
<dl>
<dt>style sheet
<dd>A <a href=http://www.w3.org/TR/CSS21/conform.html#style-sheet>CSS
style sheet</a>.
<dt>renderer
<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>authoring tool
<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 this specification
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 this specification
if, in addition to interpreting the style sheet as defined by the
appropriate specifications, it supports all the features defined
by this specification 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 this specification
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 class="no-ref heading settled heading" id=partial><span class=content>
Partial implementations</span><a class=self-link href=#partial></a></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.</p>
<h3 class="no-ref heading settled heading" id=experimental><span class=content>
Experimental implementations</span><a class=self-link href=#experimental></a></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.
</p>
<h3 class="no-ref heading settled heading" id=testing><span class=content>
Non-experimental implementations</span><a class=self-link href=#testing></a></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.
<h2 class="no-num no-ref heading settled heading" id=references><span class=content>
References</span><a class=self-link href=#references></a></h2>
<h3 class="no-num no-ref heading settled heading" id=normative><span class=content>
Normative References</span><a class=self-link href=#normative></a></h3>
<div data-fill-with=normative-references><dl>
<dt id=biblio-css21 title=CSS21><a class=self-link href=#biblio-css21></a>[CSS21]<dd>Bert Bos; et al. <a href=http://www.w3.org/TR/2011/REC-CSS2-20110607>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. W3C Recommendation. URL: <a href=http://www.w3.org/TR/2011/REC-CSS2-20110607>http://www.w3.org/TR/2011/REC-CSS2-20110607</a></dd>
<dt id=biblio-css3-images title=CSS3-IMAGES><a class=self-link href=#biblio-css3-images></a>[CSS3-IMAGES]<dd>Elika J. Etemad; Tab Atkins Jr.. <a href=http://www.w3.org/TR/2012/CR-css3-images-20120417/>CSS Image Values and Replaced Content Module Level 3</a>. 17 April 2012. W3C Candidate Recommendation. (Work in progress.) URL: <a href=http://www.w3.org/TR/2012/CR-css3-images-20120417/>http://www.w3.org/TR/2012/CR-css3-images-20120417/</a></dd>
<dt id=biblio-css3col title=CSS3COL><a class=self-link href=#biblio-css3col></a>[CSS3COL]<dd>Håkon Wium Lie. <a href=http://www.w3.org/TR/2011/CR-css3-multicol-20110412>CSS Multi-column Layout Module</a>. 12 April 2011. W3C Candidate Recommendation. (Work in progress.) URL: <a href=http://www.w3.org/TR/2011/CR-css3-multicol-20110412>http://www.w3.org/TR/2011/CR-css3-multicol-20110412</a></dd>
<dt id=biblio-rfc2119 title=RFC2119><a class=self-link href=#biblio-rfc2119></a>[RFC2119]<dd>S. Bradner. <a href=http://www.ietf.org/rfc/rfc2119.txt>Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <a href=http://www.ietf.org/rfc/rfc2119.txt>http://www.ietf.org/rfc/rfc2119.txt</a></dd>
</dl></div>
<h3 class="no-num no-ref heading settled heading" id=informative><span class=content>
Informative References</span><a class=self-link href=#informative></a></h3>
<div data-fill-with=informative-references><dl>
<dt id=biblio-css3-break title=CSS3-BREAK><a class=self-link href=#biblio-css3-break></a>[CSS3-BREAK]<dd>Rossen Atanassov; Elika J. Etemad. <a href=http://www.w3.org/TR/2012/WD-css3-break-20120823/>CSS Fragmentation Module Level 3</a>. 23 August 2012. W3C Working Draft. (Work in progress.) URL: <a href=http://www.w3.org/TR/2012/WD-css3-break-20120823/>http://www.w3.org/TR/2012/WD-css3-break-20120823/</a></dd>
<dt id=biblio-css3color title=CSS3COLOR><a class=self-link href=#biblio-css3color></a>[CSS3COLOR]<dd>Tantek Çelik; Chris Lilley; L. David Baron. <a href=http://www.w3.org/TR/2011/REC-css3-color-20110607>CSS Color Module Level 3</a>. 7 June 2011. W3C Recommendation. URL: <a href=http://www.w3.org/TR/2011/REC-css3-color-20110607>http://www.w3.org/TR/2011/REC-css3-color-20110607</a></dd>
</dl></div>
<h2 class="no-num no-ref heading settled heading" id=index><span class=content>
Index</span><a class=self-link href=#index></a></h2>
<div data-fill-with=index><ul class=indexlist>
<li>available, <a href=#available title="section 2">2</a>
<li>available block-size, <a href=#available title="section 2">2</a>
<li>available inline-size, <a href=#available title="section 2">2</a>
<li>available size, <a href=#available title="section 2">2</a>
<li>available space, <a href=#available title="section 2">2</a>
<li>contain-floats, <a href="#valdef-width min-width max-width height min-height max-height.contain-floats" title="section 3.2">3.2</a>
<li>definite, <a href=#definite title="section 2">2</a>
<li>definite size, <a href=#definite title="section 2">2</a>
<li>Extrinsic sizing, <a href=#extrinsic-sizing title="section 5">5</a>
<li>fallback, <a href=#fallback title="section 2">2</a>
<li>fallback size, <a href=#fallback title="section 2">2</a>
<li>fill<ul><li>value for width, min-width, max-width, height, min-height, max-height, <a href="#valdef-width min-width max-width height min-height max-height.fill" title="section 3.1">3.1</a>
<li>value for column-width, <a href=#valdef-column-width.fill title="section 3.3">3.3</a>
</ul><li>fill-available block-size, <a href=#fill-available-block-size title="section 2">2</a>
<li>fill-available fit, <a href=#fill-available-fit title="section 2">2</a>
<li>fill-available inline-size, <a href=#fill-available-inline-size title="section 2">2</a>
<li>fit-content<ul><li>value for width, min-width, max-width, height, min-height, max-height, <a href="#valdef-width min-width max-width height min-height max-height.fit-content" title="section 3.1">3.1</a>
<li>value for column-width, <a href=#valdef-column-width.fit-content title="section 3.3">3.3</a>
</ul><li>fit-content block-size, <a href=#fit-content-block-size title="section 2">2</a>
<li>fit-content inline-size, <a href=#fit-content-inline-size title="section 2">2</a>
<li>indefinite, <a href=#indefinite title="section 2">2</a>
<li>indefinite size, <a href=#indefinite title="section 2">2</a>
<li>Intrinsic sizing, <a href=#intrinsic-sizing title="section 4">4</a>
<li>max-content<ul><li>value for width, min-width, max-width, height, min-height, max-height, <a href="#valdef-width min-width max-width height min-height max-height.max-content" title="section 3.1">3.1</a>
<li>value for column-width, <a href=#valdef-column-width.max-content title="section 3.3">3.3</a>
</ul><li>max-content block-size, <a href=#max-content-block-size title="section 2">2</a>
<li>max-content block-size contribution, <a href=#max-content-contribution title="section 2">2</a>
<li>max-content constraint, <a href=#max-content-constraint title="section 2">2</a>
<li>max-content contribution, <a href=#max-content-contribution title="section 2">2</a>
<li>max-content inline-size, <a href=#max-content-inline-size title="section 2">2</a>
<li>max-content inline-size contribution, <a href=#max-content-contribution title="section 2">2</a>
<li>max-content size, <a href=#max-content-inline-size title="section 2">2</a>
<li>min-content<ul><li>value for width, min-width, max-width, height, min-height, max-height, <a href="#valdef-width min-width max-width height min-height max-height.min-content" title="section 3.1">3.1</a>
<li>value for column-width, <a href=#valdef-column-width.min-content title="section 3.3">3.3</a>
</ul><li>min-content block-size, <a href=#min-content-block-size title="section 2">2</a>
<li>min-content block-size contribution, <a href=#min-content-contribution title="section 2">2</a>
<li>min-content constraint, <a href=#min-content-constraint title="section 2">2</a>
<li>min-content contribution, <a href=#min-content-contribution title="section 2">2</a>
<li>min-content inline-size, <a href=#min-content-inline-size title="section 2">2</a>
<li>min-content inline-size contribution, <a href=#min-content-contribution title="section 2">2</a>
<li>min-content size, <a href=#min-content-inline-size title="section 2">2</a>
<li>preferred block-size, <a href=#preferred-block-size title="section 2">2</a>
<li>preferred inline-size, <a href=#preferred-inline-size title="section 2">2</a>
<li>preferred-size constraint, <a href=#preferred-size-constraint title="section 2">2</a>
<li>preferred-size contribution, <a href=#preferred-size-contribution title="section 2">2</a>
<li>repudiate-floats, <a href="#valdef-width min-width max-width height min-height max-height.repudiate-floats" title="section 3.1">3.1</a>
<li>size, <a href=#size title="section 2">2</a>
</ul></div>
<h2 class="no-num no-ref heading settled heading" id=property-index><span class=content>
Property index</span><a class=self-link href=#property-index></a></h2>
<div data-fill-with=property-index><p>No properties defined.</div>
<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div 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 block-sizes be different,
even if they are the same elsewhere.
<a href=#issue-8e234986> ↵ </a></div><div class=issue>
Same issue as <a data-link-type=dfn href=#min-content-block-size title="min-content block-size">min-content block-size</a>.
<a href=#issue-3584239e> ↵ </a></div><div class=issue>Less stupid name?<a href=#issue-f5f00b2c> ↵ </a></div>
<div class=issue>
Does this value work?
Is it needed?
<a href=http://lists.w3.org/Archives/Public/www-style/2013Feb/0212.html>Feedback from dbaron</a>
<a href=#issue-4aee2f40> ↵ </a></div><div class=issue>
Right now all of these except <a class=css data-link-for=width data-link-type=maybe href="#valdef-width min-width max-width height min-height max-height.fill" title=fill>fill</a> mean the same thing
for block-sizes. This may or may not be ideal.
<a href=#issue-250b0406> ↵ </a></div><div class=issue>
If the inline-size is <span class=css data-link-for=width data-link-type=maybe title=auto>auto</span>,
we could have min-content block-size imply a max-content inline-size,
and vice versa.
<a href=#issue-67feae6b> ↵ </a></div><div class=issue>
???
<a href=#issue-0d1b08c3> ↵ </a></div><div class=issue>
This definition might end up skipping further up the ancestor chain than we’d like in some cases.
<a href=http://lists.w3.org/Archives/Public/www-style/2012Oct/0204.html>Example.</a>
Maybe it should stop at each formatting root, or something similar?
<a href=#issue-935dd67b> ↵ </a></div></div>