Skip to content

Commit bfdfb9f

Browse files
committed
[css-grid-1] Clarify definition of fit-content(). w3c#3569
1 parent 5a4159b commit bfdfb9f

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

css-grid-1/Overview.bs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,10 +1495,12 @@ Explicit Track Sizing: the 'grid-template-rows' and 'grid-template-columns' prop
14951495
<dt><dfn lt="fit-content()">fit-content( <<length-percentage>> )</dfn>
14961496
<dd>
14971497
Represents the formula
1498-
<code>min(''max-content'', max(''auto'', <var>argument</var>))</code>,
1499-
which is calculated like ''minmax(auto, max-content)'',
1500-
except that the track size is clamped at <var>argument</var>
1501-
if it is greater than the ''auto'' minimum.
1498+
<code>min(<var>minimum</var>, max(<var>limit</var>, ''max-content''))</code>,
1499+
where <var>minimum</var> represents an ''grid-template-columns/auto'' minimum
1500+
(which is often, but not always, equal to a ''min-content'' minimum),
1501+
and <var>limit</var> is the argument to ''fit-content()''.
1502+
This is essentially calculated as the smaller of
1503+
''minmax(auto, max-content)'' and ''minmax(auto, <var>limit</var>)''.
15021504
</dl>
15031505

15041506
<div class='example'>

css-grid-1/issues-cr-2017.bsi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ Comment: https://github.com/w3c/csswg-drafts/issues/3567
385385
Response: https://github.com/w3c/csswg-drafts/issues/3567#issuecomment-458755401
386386
Changes: https://github.com/w3c/csswg-drafts/commit/ac95c6f9b43e7f0c6a376bb0ddd6df3635138936
387387
Closed: Accepted
388+
Verified: https://github.com/w3c/csswg-drafts/issues/3567#issuecomment-458758329
388389
Resolved: Editorial
389390
----
390391
Issue 44.
@@ -395,3 +396,17 @@ Response: https://github.com/w3c/csswg-drafts/issues/3568#issuecomment-458746482
395396
Closed: Accepted
396397
Resolved: Bugfix
397398
----
399+
Issue 45.
400+
Summary: Definition of fit-content() is confusing
401+
From: Oriol Brufau
402+
Comment: https://github.com/w3c/csswg-drafts/issues/3569
403+
Open
404+
----
405+
Issue 46.
406+
Summary: auto minimums under min/max-content constraint aren't floored at zero
407+
From: Oriol Burfau
408+
Comment: https://github.com/w3c/csswg-drafts/issues/3570
409+
Response: https://github.com/w3c/csswg-drafts/issues/3570#issuecomment-458756448
410+
Closed: Accepted
411+
Resolved: Bugfix
412+
----

css-grid-1/issues-cr-2017.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ <h1>CSS Grid Layout Level 1 Disposition of Comments for 2017-12-14 CR</h1>
423423
<span>Response: <a href='https://github.com/w3c/csswg-drafts/issues/3567#issuecomment-458755401'>https://github.com/w3c/csswg-drafts/issues/3567#issuecomment-458755401</a></span>
424424
<span>Changes: <a href='https://github.com/w3c/csswg-drafts/commit/ac95c6f9b43e7f0c6a376bb0ddd6df3635138936'>https://github.com/w3c/csswg-drafts/commit/ac95c6f9b43e7f0c6a376bb0ddd6df3635138936</a></span>
425425
<span class="a">Closed: Accepted</span>
426+
<span class="a">Verified: <a href='https://github.com/w3c/csswg-drafts/issues/3567#issuecomment-458758329'>https://github.com/w3c/csswg-drafts/issues/3567#issuecomment-458758329</a></span>
426427
<span>Resolved: Editorial</span></pre>
427428
<pre class=' a' id='issue-44'>
428429
<span>Issue 44. <a href='#issue-44'>#</a></span>
@@ -432,6 +433,20 @@ <h1>CSS Grid Layout Level 1 Disposition of Comments for 2017-12-14 CR</h1>
432433
<span>Response: <a href='https://github.com/w3c/csswg-drafts/issues/3568#issuecomment-458746482'>https://github.com/w3c/csswg-drafts/issues/3568#issuecomment-458746482</a></span>
433434
<span class="a">Closed: Accepted</span>
434435
<span>Resolved: Bugfix</span></pre>
436+
<pre class='open ' id='issue-45'>
437+
<span>Issue 45. <a href='#issue-45'>#</a></span>
438+
<span>Summary: Definition of fit-content() is confusing</span>
439+
<span>From: Oriol Brufau</span>
440+
<span>Comment: <a href='https://github.com/w3c/csswg-drafts/issues/3569'>https://github.com/w3c/csswg-drafts/issues/3569</a></span>
441+
<span>Open</span></pre>
442+
<pre class=' a' id='issue-46'>
443+
<span>Issue 46. <a href='#issue-46'>#</a></span>
444+
<span>Summary: auto minimums under min/max-content constraint aren't floored at zero</span>
445+
<span>From: Oriol Burfau</span>
446+
<span>Comment: <a href='https://github.com/w3c/csswg-drafts/issues/3570'>https://github.com/w3c/csswg-drafts/issues/3570</a></span>
447+
<span>Response: <a href='https://github.com/w3c/csswg-drafts/issues/3570#issuecomment-458756448'>https://github.com/w3c/csswg-drafts/issues/3570#issuecomment-458756448</a></span>
448+
<span class="a">Closed: Accepted</span>
449+
<span>Resolved: Bugfix</span></pre>
435450
<script>
436451
(function () {
437452
var sheet = document.styleSheets[0];

0 commit comments

Comments
 (0)