Skip to content

Commit 5a43ab7

Browse files
committed
[css-grid-1] Handle division by zero case for distributing intrinsic item space to flexible tracks. #3694
1 parent 201a41c commit 5a43ab7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

css-grid-1/Overview.bs

+16
Original file line numberDiff line numberDiff line change
@@ -4164,6 +4164,9 @@ Resolve Intrinsic Track Sizes</h3>
41644164
distributing space <em>only</em> to <a>flexible tracks</a>
41654165
(i.e. treating all other tracks as having a <a>fixed sizing function</a>)
41664166
<li>
4167+
if the sum of the <a>flexible sizing functions</a>
4168+
of all <a>flexible tracks</a> spanned by the item
4169+
is greater than zero,
41674170
distributing space to such tracks
41684171
according to the ratios of their <a>flexible sizing functions</a>
41694172
rather than distributing space equally
@@ -4661,6 +4664,19 @@ Major Changes</h4>
46614664
(<a href="https://github.com/w3c/csswg-drafts/issues/3638">Issue 3638</a>,
46624665
<a href="https://github.com/w3c/csswg-drafts/issues/3665">Issue 3665</a>)
46634666

4667+
<li id="change-2018-flex-zero-sum">
4668+
Don't divide by zero when <a lt="distribute extra space">distributing extra space</a>
4669+
across <a>flexible tracks</a>
4670+
when the sum of their <a>flexible sizing functions</a> is zero.
4671+
(<a href="https://github.com/w3c/csswg-drafts/issues/3694">Issue 3694</a>)
4672+
<blockquote>
4673+
<p><ins>if the sum of the <a>flexible sizing functions</a>
4674+
of all <a>flexible tracks</a> spanned by the item
4675+
is greater than zero,</ins>
4676+
distributing space to such tracks
4677+
according to the ratios of their <a>flexible sizing functions</a>
4678+
rather than distributing space equally
4679+
</blockquote>
46644680
</ul>
46654681

46664682
<h4 id="clarify-2017">

0 commit comments

Comments
 (0)