2929
3030 < h1 id =head-box-flexible > CSS Flexible Box Layout Module</ h1 >
3131
32- < h2 class ="no-num no-toc " id =w3c-working > Editor's Draft, 17 February 2012</ h2 >
32+ < h2 class ="no-num no-toc " id =w3c-working > Editor's Draft, 18 February 2012</ h2 >
3333
3434 < dl >
3535 < dt > This version:
36- <!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-flexbox-20120217 /">http://www.w3.org/TR/2012/ED-css3-flexbox-20120217 /</a>-->
36+ <!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-flexbox-20120218 /">http://www.w3.org/TR/2012/ED-css3-flexbox-20120218 /</a>-->
3737
3838
3939 < dd > < a
@@ -238,7 +238,7 @@ <h2 class="no-num no-toc" id=table>Table of contents</h2>
238238 < li > < a href ="#layout-algorithm "> < span class =secno > 7. </ span > Flexbox
239239 Layout Algorithm</ a >
240240
241- < li > < a href ="#pagination "> < span class =secno > 8. </ span > Page breaks in
241+ < li > < a href ="#pagination "> < span class =secno > 8. </ span > Page breaks in
242242 flexbox</ a >
243243
244244 < li > < a href ="#conformance "> < span class =secno > 9. </ span > Conformance</ a >
@@ -1915,14 +1915,14 @@ <h2 id=layout-algorithm><span class=secno>7. </span> Flexbox Layout
19151915 the flexbox items generate boxes in the box-tree, and how the rest of
19161916 this algorithm deals with the items.
19171917
1918- < li > Determine the hypothetical main size of items
1918+ < li > Determine the hypothetical main size of items:
19191919 < ol >
19201920 < li > If item has a definite preferred size, it is the hypothetical main
19211921 size.
19221922
19231923 < li >
19241924 < p > Otherwise layout the flexbox items using the shrink-to-fit
1925- algorithm.
1925+ algorithm.</ p >
19261926
19271927 < p > Calculation of the shrink-to-fit width is similar to calculating the
19281928 width of a table cell using the automatic table layout algorithm.
@@ -2049,23 +2049,22 @@ <h2 id=layout-algorithm><span class=secno>7. </span> Flexbox Layout
20492049 lengths</ dfn > of the items within a flexbox line:
20502050
20512051 < ol >
2052- < li > Determine sign of flexibility
2052+ < li > Determine sign of flexibility
20532053 < ol >
20542054 < li > Add sizes of all items, < i > adjusted for min/max</ i > .
20552055
20562056 < li > If sum of preferred sizes is less than available space, use positive
2057- flexibility, otherwise use negative flexibility
2057+ flexibility, otherwise use negative flexibility.
20582058 </ ol >
20592059
20602060 < p > for the rest of the algorithm use flexibility with the sign determined
2061- in this step
2061+ in this step</ p >
20622062
20632063 < li > Reset all flexible sizes to their preferred size
20642064
20652065 < li > Find free space by subtracting sum of item sizes from available space.
2066-
20672066
2068- < li > Distribute free space proportional to flex
2067+ < li > Distribute free space proportional to flex:
20692068 < ol >
20702069 < li > If the free space is positive, but step 1 chose negative
20712070 flexibility, do nothing
@@ -2077,7 +2076,7 @@ <h2 id=layout-algorithm><span class=secno>7. </span> Flexbox Layout
20772076 item's flexibility
20782077 </ ol >
20792078
2080- < li > Fix min/max violations
2079+ < li > Fix min/max violations:
20812080 < ol >
20822081 < li > Adjust each flexible item for min/max.
20832082
@@ -2087,27 +2086,23 @@ <h2 id=layout-algorithm><span class=secno>7. </span> Flexbox Layout
20872086 violation). Accumulate the difference.
20882087 </ ol >
20892088
2090- < li > If the sum of all violations is
2091- < ol >
2092- < li > Zero: done
2089+ < li > If the sum of all violations is:
2090+ < dl >
2091+ < dt > Zero
20932092
2094- < li > Positive:
2095- < ol >
2096- < li > Freeze items with max violations.
2093+ < dd > Exit the algorithm.
20972094
2098- < li > Go to step 2
2099- </ ol >
2095+ < dt > Positive
21002096
2101- < li > Negative
2102- < ol >
2103- < li > Freeze items with min violations
2097+ < dd > Freeze items with max violations, and return to step 2.
21042098
2105- < li > Go to step 2
2106- </ ol >
2107- </ ol >
2099+ < dt > Negative
2100+
2101+ < dd > Freeze items with min violations, and return to step 2.
2102+ </ dl >
21082103 </ ol >
21092104
2110- < div class =note >
2105+ < div class =issue >
21112106 < p > Previous algorithm - compare with above and chose one:</ p >
21122107
21132108 < ol >
@@ -2197,7 +2192,7 @@ <h2 id=layout-algorithm><span class=secno>7. </span> Flexbox Layout
21972192 </ ol >
21982193 </ div >
21992194
2200- < h2 id =pagination > < span class =secno > 8. </ span > Page breaks in flexbox</ h2 >
2195+ < h2 id =pagination > < span class =secno > 8. </ span > Page breaks in flexbox</ h2 >
22012196
22022197 < p > Flexboxes can break across pages between items, between lines of items
22032198 (in multi-line mode) and inside items, as long as ‘< code
@@ -2218,7 +2213,7 @@ <h2 id=pagination><span class=secno>8. </span>Page breaks in flexbox</h2>
22182213
22192214 < li > When flexbox is continued after a break, flexbox’s available space
22202215 in block direction is reduced by space consumed in previous pages.
2221- Consumed space before page break is
2216+ Consumed space before page break is:
22222217 < ol >
22232218 < li > If flexbox starts on that page: the distance between start of
22242219 content box of the flexbox and the end of available space
@@ -2230,13 +2225,14 @@ <h2 id=pagination><span class=secno>8. </span>Page breaks in flexbox</h2>
22302225 < p > If as a result of this adjustment block-direction size of flexbox
22312226 becomes negative, it is set to zero.</ p >
22322227
2233- < li > < dfn id =forced-breaks-on-flexbox-items > Forced breaks on flexbox
2228+ < li > < dfn id =forced-breaks-on-flexbox-items > Forced breaks on flexbox
22342229 items</ dfn >
22352230 < ol >
22362231 < li > In a row-direction single-line flexbox, breaks before and after
22372232 items apply to the flexbox
22382233
2239- < li > In column-directon single-line flexbox and all multi-line flexboxes
2234+ < li > In column-directon single-line flexbox and all multi-line flexboxes:
2235+
22402236 < ol >
22412237 < li > Forced break before the first item is applied to the flexbox
22422238
@@ -2268,17 +2264,17 @@ <h2 id=pagination><span class=secno>8. </span>Page breaks in flexbox</h2>
22682264 sibling from appearing on the same page)
22692265 </ ol >
22702266
2271- < li > < b > Column-direction flexbox: single-line</ b >
2267+ < li > < b > Column-direction flexbox: single-line</ b >
22722268 < ol >
22732269 < li >
22742270 < p > If flexbox main-axis size is definite, flexbox algorithm must be run
22752271 first, without constraints of available space on page and using all
22762272 content of the flexbox. Otherwise items use the preferred size,
2277- adjusted for min/max.
2273+ adjusted for min/max.</ p >
22782274
22792275 < p > If page size varies and flexbox size depends on page size, this step
22802276 has to be repeated on each page, again with the whole content of the
2281- flexbox.
2277+ flexbox.</ p >
22822278
22832279 < li > Set of items that will fit on current page is determined by adding
22842280 main-axis sizes of items until total size exceeds avaialble space or a
@@ -2290,10 +2286,10 @@ <h2 id=pagination><span class=secno>8. </span>Page breaks in flexbox</h2>
22902286 < li >
22912287 < p > Items that fit on a page completely or partially are aligned
22922288 according to ‘flex-pack’ property, independently from the rest of
2293- flexbox content.
2289+ flexbox content.</ p >
22942290
22952291 < p > Note that flexible lenghts are not recalculated on each page, even
2296- if there is additional free space.
2292+ if there is additional free space.</ p >
22972293 </ ol >
22982294
22992295 < p class =note > It is the intent of this spec that column-direction
@@ -2302,19 +2298,19 @@ <h2 id=pagination><span class=secno>8. </span>Page breaks in flexbox</h2>
23022298 should paginate identically to a block with non-floating children with
23032299 same content, same used size and same used margins. This rule is
23042300 simplified and not normative, but if there is any difference it should
2305- be noted here.
2301+ be noted here.</ p >
23062302
2307- < li > < b > Column-direction flexbox: multi-line</ b >
2303+ < li > < b > Column-direction flexbox: multi-line</ b >
23082304 < ol >
23092305 < li > Items are collected in lines and laid out as usual, but in available
23102306 space on current page.
23112307
2312- < li > If border box of an item doesn’t fit on main-axis,
2308+ < li > If border box of an item doesn’t fit on main-axis:
23132309 < ol >
23142310 < li > If it is the last item of the last line, a break inside the item
23152311 is considered
23162312
2317- < li > Otherwise
2313+ < li > Otherwise:
23182314 < ol >
23192315 < li > If the flexbox is not at the top of the page, it is moved to the
23202316 next page.
@@ -2324,7 +2320,7 @@ <h2 id=pagination><span class=secno>8. </span>Page breaks in flexbox</h2>
23242320 class =property > overflow</ code > ’ property of the flexbox is
23252321 set to ‘< code class =property > visible</ code > ’, it is
23262322 paginated using same rules as visible overflow of blocks in normal
2327- flow
2323+ flow.
23282324 < p class =note > After the break, continuation of overflow items may
23292325 overlap with other items and/or content after the flexbox. It is
23302326 undesirable but there is no good resolution for this spacial
@@ -2334,15 +2330,15 @@ <h2 id=pagination><span class=secno>8. </span>Page breaks in flexbox</h2>
23342330 </ ol >
23352331 </ ol >
23362332
2337- < li > < b > Row-direction flexbox: single-line</ b >
2333+ < li > < b > Row-direction flexbox: single-line</ b >
23382334 < ol >
23392335 < li >
23402336 < p > Main-axis space distribution in each line is done based on complete
23412337 content of the flexbox and without space constraint in block
2342- direction.
2338+ direction.</ p >
23432339
23442340 < p > If page size varies and flexbox size depends on page size, this step
2345- needs to be repeated on each page
2341+ needs to be repeated on each page. </ p >
23462342
23472343 < li > Items are sized and positioned as usual, but in block-direction
23482344 available space of min(remaining available space in flexbox, remaining
@@ -2359,7 +2355,7 @@ <h2 id=pagination><span class=secno>8. </span>Page breaks in flexbox</h2>
23592355 needed.
23602356
23612357 < li > Items that fit completely or partially on current page are aligned
2362- on cross-axis
2358+ on cross-axis:
23632359 < ol >
23642360 < li > For the purposes of cross-axis alignment, minimum of remaining
23652361 available space in flexbox and available space at current page is
@@ -2372,9 +2368,9 @@ <h2 id=pagination><span class=secno>8. </span>Page breaks in flexbox</h2>
23722368 </ ol >
23732369 </ ol >
23742370
2375- < li > < b > Row-direction flexbox:multi-line</ b >
2371+ < li > < b > Row-direction flexbox:multi-line</ b >
23762372 < ol >
2377- < li > Collect items into lines and determine line heights
2373+ < li > Collect items into lines and determine line heights:
23782374 < ol >
23792375 < li >
23802376 < p > If ‘< a href ="#flex-line-pack0 "> < code
@@ -2383,13 +2379,13 @@ <h2 id=pagination><span class=secno>8. </span>Page breaks in flexbox</h2>
23832379 class =property > stretch</ code > </ a > ’ and flexbox size in block
23842380 direction is definite, layout of the complete flexbox has to be done
23852381 first to determine line heights. Layout is done as usual for
2386- non-paginated case, but accounting for forced breaks
2382+ non-paginated case, but accounting for forced breaks. </ p >
23872383
23882384 < p > If page size varies, this step may have to be redone, again with
23892385 complete content; special consideration should be to be given to
23902386 line breaks to ensure that item at the start of current page is also
23912387 at the start of a line in this hypothetical layout. This
2392- specification currently doesn't define how exactly to achieve that.
2388+ specification currently doesn't define how exactly to achieve that.</ p >
23932389
23942390 < li > Otherwise, items are collected into lines and each line is laid
23952391 out as a single-line flexbox to determine block-direction size of
0 commit comments