css3-flexbox/Overview.src.html

changeset 4730
31a77ffed8db
parent 4729
8ecc80bfa2ed
child 4731
802c601e4ec0
     1.1 --- a/css3-flexbox/Overview.src.html	Mon Mar 12 00:03:15 2012 -0700
     1.2 +++ b/css3-flexbox/Overview.src.html	Mon Mar 12 00:35:49 2012 -0700
     1.3 @@ -957,21 +957,22 @@
     1.4  				<li>If item has a definite preferred size, it is the hypothetical main size. </li>
     1.5  
     1.6  				<li>
     1.7 -					<p>Otherwise layout the flexbox items using the shrink-to-fit algorithm.</p>
     1.8 -
     1.9 -					<p>Calculation of the shrink-to-fit width is similar to calculating the width of a table cell using the automatic table layout algorithm. Roughly: calculate the preferred width by formatting the content without breaking lines other than where explicit line breaks occur, and also calculate the preferred minimum width, e.g., by trying all possible line breaks. This module doesn&#39;t define the exact algorithm, but it is expected that the shrink-to-fit size is calculated the same way as it is for floats, except in this case it is not affected by available space.</p>
    1.10 -				
    1.11 -					<div class="issue"><p>TODO: define shrink-to-fit. It works 
    1.12 -						differently in row/column flexboxes:</p>
    1.13 -						<ul>
    1.14 -							<li>In horizontal, STF is max-content. </li>
    1.15 -							<li>In vertical, cross-axis 
    1.16 -					alignment has to happen first, then main-axis STF size can 
    1.17 -					be calculated. In multi-line vertical (tricky case), auto 
    1.18 -							sizes on cross axis are resolved as if it was 
    1.19 -							single-line.</li>
    1.20 -						</ul>
    1.21 -					</div>
    1.22 +					<p>Otherwise layout the flexbox items using the 
    1.23 +					shrink-to-fit algorithm:</p>
    1.24 +					<ol>
    1.25 +					<li>
    1.26 +						<p>In row-direction flexbox, shrink-to-fit size of a flex item along the main axis is its 'max-content', as defined in [[!CSS3-WRITING-MODES]]</p>
    1.27 +					<li>
    1.28 +						<p>In column-direction flexbox, shrink-to-fit size of a flex item along the main axis 
    1.29 +						is the extent in block direction that it gets when laid 
    1.30 +						out using its &#39;fit-content&#39; as its size in inline 
    1.31 +						direction, using cross-size of flexbox content box as 
    1.32 +						available measure, also as defined in 
    1.33 +						[[!CSS3-WRITING-MODES]]. </p>
    1.34 +						<p>In multi-line column-direction flexbox, cross-size of the whole flexbox content box is used as available measure, not the share of individual flexbox line, to avoid a circular dependency of line breaks on shrink-to-fit calculations.</p>
    1.35 +						
    1.36 +					</li>
    1.37 +					</ol>
    1.38  				</li>
    1.39  			</ol>
    1.40  

mercurial