Skip to content

Commit f91643f

Browse files
committed
[css-sizing-4] Extract out intrinsic-sizing section, which is getting deferred again.
1 parent 16da297 commit f91643f

2 files changed

Lines changed: 215 additions & 215 deletions

File tree

css-sizing-4/Overview.bs

Lines changed: 0 additions & 215 deletions
Original file line numberDiff line numberDiff line change
@@ -396,221 +396,6 @@ Automatic Content-based Minimum Sizes</h4>
396396
<h2 id='intrinsic'>
397397
Intrinsic Size Determination</h2>
398398

399-
ISSUE: <strong>Need to Sync This Section With Level 3 It is Super Out Of Date</strong>
400-
401-
<dfn export lt="intrinsic size">Intrinsic sizing</dfn> determines sizes based on the contents of a box,
402-
without regard for the context in which it is placed.
403-
404-
Precisely how to calculate the [=intrinsic size=] of a box depends on its layout mode;
405-
the following subsections define intrinsic sizing for several types of layouts.
406-
Individual layout modes,
407-
such as Flexbox or Grid,
408-
can define their own intrinsic sizing rules.
409-
410-
If a box has an [=explicit intrinsic inner size=] in an axis,
411-
then that is all of its [=intrinsic sizes=] in that axis.
412-
If the other axis does not have an [=explicit intrinsic inner size=],
413-
then its intrinsic sizes are determined normally,
414-
without regard for the [=explicit intrinsic inner size=] in the first axis.
415-
416-
417-
<h3 id='replaced-intrinsic'>
418-
Intrinsic Sizes of Replaced Elements</h3>
419-
420-
<p>
421-
For replaced elements,
422-
the <a>min-content size</a> and <a>max-content size</a> are equivalent
423-
and correspond to the appropriate dimension of the concrete object size returned by
424-
the <a href="https://www.w3.org/TR/css3-images/#default-sizing">default sizing algorithm</a> [[!CSS3-IMAGES]]
425-
of the element,
426-
calculated with an unconstrained specified size.
427-
428-
The <a>min-content contribution</a> and <a>max-content contribution</a> in each axis
429-
is the element's specified outer size in that axis, if definite;
430-
otherwise, they are the <a>min-content size</a>, as specified above,
431-
plus the element's margin/border/padding in that axis,
432-
clamped by the element's min and max size properties in that axis.
433-
434-
<h3 id='inline-intrinsic'>
435-
Intrinsic Sizes of Non-Replaced Inlines</h3>
436-
437-
<p>
438-
The <a>min-content inline size</a> of an inline box
439-
is the length of the largest unbreakable sequence of inline content.
440-
The <a>min-content inline-size contribution</a> of an inline box
441-
is its <a>min-content inline size</a>,
442-
plus any <a>inline-axis</a> margin, border, and padding
443-
adjacent to that sequence.
444-
445-
<p>
446-
The <a>max-content inline size</a> of an inline box
447-
is the length of the largest sequence of inline content
448-
on a single line
449-
when only forced line breaks are taken.
450-
The <a>max-content inline-size contribution</a> of an inline box
451-
is its <a>max-content inline size</a>,
452-
plus any <a>inline-axis</a> margin, border, and padding
453-
adjacent to that sequence.
454-
455-
<p>
456-
The <a>min-content block size</a>, <a>max-content block size</a>, <a>min-content block-size contribution</a>, and <a>max-content block-size contribution</a> of an inline box
457-
are the distance from the head edge of the first line box
458-
to the foot edge of the last line box
459-
on which the inline appears.
460-
461-
<h3 id='block-intrinsic'>
462-
Intrinsic Sizes of Non-Replaced Blocks</h3>
463-
464-
<p>
465-
The <a>min-content inline size</a> of a <a>block container box</a>
466-
is the largest <a>min-content inline-size contribution</a>
467-
of its in-flow or floated children.
468-
469-
<p>
470-
The <a>max-content inline size</a> of a <a>block container box</a>
471-
is the inline-size of the box after layout,
472-
if all children are sized under a <a>max-content constraint</a>.
473-
<p>
474-
If the computed inline-size of a <a>block-level box</a>
475-
is ''width/min-content'', ''width/max-content'', or a <a>definite size</a>,
476-
its <a>min-content inline-size contribution</a>
477-
is that size
478-
plus any <a>inline-axis</a> margin, border, and padding.
479-
Otherwise, if the computed inline-size of the block is ''width/fit-content'', ''width/auto'', or ''width/stretch'',
480-
its <a>min-content inline-size contribution</a>
481-
is its <a>min-content inline size</a>
482-
plus any <a>inline-axis</a> margin, border, and padding.
483-
484-
<p>
485-
If the computed inline-size of a <a>block-level box</a>
486-
is ''width/min-content'', ''width/max-content'', or a <a>definite size</a>,
487-
its <a>max-content inline-size contribution</a>
488-
is that size
489-
plus any <a>inline-axis</a> margin, border, and padding.
490-
Otherwise, if the computed inline-size of the block is ''width/fit-content'', ''width/auto'', or ''width/stretch'',
491-
its <a>max-content inline-size contribution</a>
492-
is its <a>max-content inline size</a>
493-
plus any <a>inline-axis</a> margin, border, and padding.
494-
495-
<p>
496-
The <a>min-content block size</a> and <a>max-content block size</a> of a <a>block container box</a>
497-
is the content block-size as defined
498-
(for horizontal writing modes)
499-
in <a href="https://www.w3.org/TR/CSS2/visudet.html#normal-block">CSS2.1§10.6.3</a>
500-
and <a href="https://www.w3.org/TR/CSS2/tables.html#height-layout">CSS2.1§17.5.3</a>
501-
for elements with ''height: auto'',
502-
and analogously for vertical writing modes.
503-
504-
<p>
505-
The <a>min-content block-size contribution</a> and <a>max-content block-size contribution</a> of a <a>block-level box</a>
506-
is the block-size of the block after layout,
507-
plus any <a>block-axis</a> margin, border, and padding.
508-
509-
Issue: Need to handle floats.
510-
See <a href="https://lists.w3.org/Archives/Public/www-style/2014Oct/0061.html">Greg's issue</a>
511-
and <a href="https://lists.w3.org/Archives/Public/www-style/2014Nov/0085.html">dbaron's response</a>.
512-
513-
<h3 id='table-intrinsic'>
514-
Intrinsic Sizes in Table Layout</h3>
515-
516-
<p class='issue'>
517-
¯\_(ツ)_/¯
518-
519-
520-
521-
<h3 id="multicol-intrinsic">
522-
Intrinsic Sizes in Multi-column Layout</h3>
523-
524-
525-
<h4 id="multicol-min-content">
526-
Min-content Sizes in Multi-column Layout</h3>
527-
528-
<p>
529-
The <a>min-content inline size</a> of a multi-column container
530-
with a computed 'column-width' not ''column-width/auto''
531-
is the smaller of
532-
its 'column-width'
533-
and the largest <a>min-content inline-size contribution</a> of its contents.
534-
535-
<p>
536-
The <a>min-content inline size</a> of a multi-column container
537-
with a computed 'column-width' of ''column-width/auto''
538-
is the largest <a>min-content inline-size contribution</a> of its contents
539-
multiplied by its 'column-count'
540-
(treating ''column-count/auto'' as ''1''),
541-
plus its 'column-gap' multiplied by 'column-count' minus 1.
542-
543-
<h4 id="multicol-max-content">
544-
Max-content Sizes in Unconstrained-height Multi-column Layout</h3>
545-
546-
<p>
547-
The <a>max-content inline size</a> of a multi-column container
548-
with unrestrained column heights
549-
and a computed 'column-count' not ''column-count/auto''
550-
is its 'column-count'
551-
multiplied by the larger of
552-
its 'column-width' (treating ''column-width/auto'' as zero)
553-
and the largest <a>min-content inline-size contribution</a> of its contents,
554-
plus its 'column-gap' multiplied by 'column-count' minus 1.
555-
556-
<p class="note">
557-
Note that the contents of the multi-column container
558-
can still grow to be wider and shorter
559-
if the resulting column width is still smaller
560-
than the largest <a>max-content inline-size contribution</a> of its contents.
561-
562-
<p>
563-
The <a>max-content inline size</a> of a multi-column container
564-
with unrestrained column heights
565-
and a computed 'column-count' of ''column-count/auto''
566-
is its 'column-width'
567-
multiplied by the number of columns obtained by taking all allowed column breaks [[CSS3-BREAK]],
568-
plus its 'column-gap' multiplied by that same number of columns minus 1.
569-
570-
<!--
571-
The above was decided based on dholbert's example in http://lists.w3.org/Archives/Public/www-style/2012Oct/0017.html .
572-
These definitions make multicols work well in flexbox,
573-
both in ''stretch'' and non-''stretch'' cases,
574-
without wasted space or needless overflow.
575-
-->
576-
577-
<h4 id="multicol-max-content-restrained">
578-
Max-content Sizes in Constrained-height Multi-column Layout</h3>
579-
580-
<p>
581-
The <a>max-content inline size</a> of a multi-column container
582-
with restrained-height columns (i.e. a specified 'height' or 'max-height', or whichever properties map to the <a>block size</a> of the element)
583-
is the <a>inline size</a> that would exactly include all of its columns.
584-
It may be approximated by:
585-
586-
<ul>
587-
<li>
588-
Laying out the element with column-spanning elements given ''display: none'',
589-
and taking a inline-size that includes all the columns.
590-
591-
<li>
592-
Laying out all of the column-spanning elements into that resulting inline-size,
593-
and taking the resulting block-size.
594-
595-
<li>
596-
Subtracting that resulting block-size from the specified restraint,
597-
laying out the element without column-spanning elements again into this adjusted block-size,
598-
and taking the inline-size of all its columns as its <a>max-content inline size</a>.
599-
</ul>
600-
601-
<p>
602-
or by some more accurate method.
603-
604-
<p class='note'>
605-
This approximation can result in some slack,
606-
but avoids overflow in the most common cases,
607-
where the balanced height of the columns above spanning elements are approximately equal.
608-
609-
<p class='note'>
610-
In the common case of no column-spanning elements,
611-
this approximation collapses to simply doing a layout,
612-
and measuring the resulting columns.
613-
614399

615400
<h3 id='intrinsic-size-override'>
616401
Overriding Contained Intrinsic Sizes: the 'contain-intrinsic-size' property</h3>

0 commit comments

Comments
 (0)