Skip to content

Commit 78ae366

Browse files
committed
[css-grid] Remove 'rewritten' flex algo. It was wrong in corner cases.
1 parent cc4820a commit 78ae366

2 files changed

Lines changed: 2 additions & 37 deletions

File tree

css-grid/Overview.bs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3509,23 +3509,6 @@ Resolve Intrinsic Track Sizes</h3>
35093509
At this point, all intrinsic <i>base sizes</i> and <i>growth limits</i>
35103510
will have been resolved to absolute lengths.
35113511

3512-
<h3 id="resolve-flex">
3513-
Distribute Free Space to Flexible Lengths</h3>
3514-
3515-
Otherwise, if the <i>free space</i> is not finite
3516-
(i.e. when the grid container's is sized under a max-content or preferred-size constraint
3517-
or it is auto-sized in infinite available space),
3518-
find the <i>flex fraction</i> by taking the maximum of:
3519-
<ul>
3520-
<li>
3521-
Each flexible track's minimum size divided by its <i>flex factor</i>.
3522-
<li>
3523-
The <i>max-size contribution</i> of each item in a flexible track divided by that track's <i>flex factor</i>.
3524-
For items that span multiple tracks,
3525-
first subtract the used sizes of all spanned non-flexible tracks from the item's <i>max-size contribution</i>,
3526-
then divide by the sum of all spanned flexible tracks' <i>flex factors</i>.
3527-
</ul>
3528-
35293512
<h2 id='pagination'>
35303513
Fragmenting Grid Layout</h2>
35313514

css-grid/Overview.html

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
</p>
9090
<h1 class="p-name no-ref" id=title>CSS Grid Layout Module Level 1</h1>
9191
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
92-
<span class=dt-updated><span class=value-title title=20140314>14 March 2014</span></span></span></h2>
92+
<span class=dt-updated><span class=value-title title=20140318>18 March 2014</span></span></span></h2>
9393
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-grid/>http://dev.w3.org/csswg/css-grid/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-grid-1/>http://www.w3.org/TR/css-grid-1/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-grid/>http://dev.w3.org/csswg/css-grid/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2013/WD-css3-grid-layout-20130402/ rel=previous>http://www.w3.org/TR/2013/WD-css3-grid-layout-20130402/</a><dd><a href=http://www.w3.org/TR/2012/WD-css3-grid-layout-20121106/ rel=previous>http://www.w3.org/TR/2012/WD-css3-grid-layout-20121106/</a>
9494
<dt>Feedback:</dt>
9595
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-grid%5D%20feedback">www-style@w3.org</a>
@@ -223,8 +223,7 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
223223
<li><a href=#algo-find-fr-size><span class=secno>11.6.1</span> Find the Size of an <span class=css data-link-type=maybe title=fr>fr</span></a></ul></ul>
224224
<li><a href=#layout-algorithm-fantasai><span class=secno>12</span> Rewritten Grid Layout Algorithm</a>
225225
<ul class=toc>
226-
<li><a href=#resolve-intrinsic><span class=secno>12.1</span> Resolve Intrinsic Track Sizes</a>
227-
<li><a href=#resolve-flex><span class=secno>12.2</span> Distribute Free Space to Flexible Lengths</a></ul>
226+
<li><a href=#resolve-intrinsic><span class=secno>12.1</span> Resolve Intrinsic Track Sizes</a></ul>
228227
<li><a href=#pagination><span class=secno>13</span> Fragmenting Grid Layout</a>
229228
<li><a href=#acks><span class=secno></span> Acknowledgements</a>
230229
<li><a href=#changes><span class=secno></span> Changes</a>
@@ -3481,23 +3480,6 @@ <h3 class="heading settled heading" data-level=12.1 id=resolve-intrinsic><span c
34813480
<p> At this point, all intrinsic <a data-link-type=dfn href=#base-size title="base sizes">base sizes</a> and <a data-link-type=dfn href=#growth-limit title="growth limits">growth limits</a>
34823481
will have been resolved to absolute lengths.
34833482

3484-
<h3 class="heading settled heading" data-level=12.2 id=resolve-flex><span class=secno>12.2 </span><span class=content>
3485-
Distribute Free Space to Flexible Lengths</span><a class=self-link href=#resolve-flex></a></h3>
3486-
3487-
<p> Otherwise, if the <a data-link-type=dfn href=#free-space title="free space">free space</a> is not finite
3488-
(i.e. when the grid container’s is sized under a max-content or preferred-size constraint
3489-
or it is auto-sized in infinite available space),
3490-
find the <a data-link-type=dfn href=#flex-fraction title="flex fraction">flex fraction</a> by taking the maximum of:
3491-
<ul>
3492-
<li>
3493-
Each flexible track’s minimum size divided by its <i data-link-type=dfn title="flex factor">flex factor</i>.
3494-
<li>
3495-
The <a data-link-type=dfn href=http://dev.w3.org/csswg/css-sizing-3/#max-size-contribution title="max-size contribution">max-size contribution</a> of each item in a flexible track divided by that track’s <i data-link-type=dfn title="flex factor">flex factor</i>.
3496-
For items that span multiple tracks,
3497-
first subtract the used sizes of all spanned non-flexible tracks from the item’s <a data-link-type=dfn href=http://dev.w3.org/csswg/css-sizing-3/#max-size-contribution title="max-size contribution">max-size contribution</a>,
3498-
then divide by the sum of all spanned flexible tracks' <i data-link-type=dfn title="flex factors">flex factors</i>.
3499-
</ul>
3500-
35013483
<h2 class="heading settled heading" data-level=13 id=pagination><span class=secno>13 </span><span class=content>
35023484
Fragmenting Grid Layout</span><a class=self-link href=#pagination></a></h2>
35033485

0 commit comments

Comments
 (0)