Skip to content

Commit e588160

Browse files
committed
[css-grid] Put some notes about flexing in a comment.
--HG-- extra : rebase_source : e0f8729cb7133d53d45a4aa9689dccaf0f8997a7
1 parent 38e2be9 commit e588160

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

css-grid/Overview.bs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2868,6 +2868,43 @@ Process Flexible Tracks</h3>
28682868
is greater than the track's <a>base size</a>,
28692869
set its <a>base size</a> to that product.
28702870

2871+
<!--
2872+
shrinkwrapping FRs
2873+
< min-content case
2874+
* never happens: tracks don't shrink below their base size
2875+
min-content case
2876+
* each flex track at its min-content size, might be uneven
2877+
in-between case
2878+
* each flex track >= min-content size, approaching all FRs equal
2879+
midpoint case
2880+
* each flex track is at least its min-content size, all FRs are equal
2881+
max-content case
2882+
* largest max-content track is at max-content, all FRs are equal
2883+
> max-content case
2884+
* each flex track is at least its max-content size, all FRs are equal
2885+
2886+
Conclusion: 1FR's base size is by default equivalent to min-content,
2887+
we'll say it is equivalent to "use min-size property".
2888+
2889+
Difference in behavior of having min-content size (by accident) vs. sizing under min-content constraint!!!
2890+
Question to author: do you want even FRs, or do you want to minimize overflow? Probably depends on 'overflow', just like in Flexbox! Nope, always minimize overflow. Even FRs will result in tracks beign *larger* than in an equivalent fixed-size container case, which doesn't make sense.
2891+
2892+
I think we can copy the "treat available space as 0/infinite in min/max constraint situations" paragraph down to the flexing paragraph. That'll produce the "minimum size" behavior for flexible things.
2893+
2894+
If you're sizing by intrinsic size, you use max(grid items' content size, grid item's min-size property).
2895+
For flexible lengths, we could do the same thing OR we could just use the grid item's min-size property, treating auto as min-content.
2896+
2897+
Interesting question: should 'auto' mean minmax(min-content, max-content) or minmax('min-size property', max-content)?
2898+
2899+
What effect does min-size: auto vs. 0 have?
2900+
2901+
Consider: minmax(auto, ?) to mean minmax('min-size property', ?)
2902+
Consider: auto to mean minmax(auto, max-content) instead of minmax(min-content, max-content) --
2903+
otherwise if you set a grid item's min-width to 50px, it will still use the min-content size as a minimum;
2904+
this way it honors min-width: 50px, which probably is what you want.
2905+
(Definitely want the default to be min-content, but min-width: auto gives us that.)
2906+
-->
2907+
28712908

28722909
<h4 id="algo-find-fr-size">
28732910
Find the Size of an ''fr''</h4>

css-grid/Overview.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2920,6 +2920,8 @@ <h3 class="heading settled heading" data-level=10.6 id=algo-flex-tracks><span cl
29202920
is greater than the track’s <a data-link-type=dfn href=#base-size title="base size">base size</a>,
29212921
set its <a data-link-type=dfn href=#base-size title="base size">base size</a> to that product.</p>
29222922

2923+
<p></p>
2924+
29232925

29242926
<h4 class="heading settled heading" data-level=10.6.1 id=algo-find-fr-size><span class=secno>10.6.1 </span><span class=content>
29252927
Find the Size of an <span class=css data-link-type=maybe title=fr>fr</span></span><a class=self-link href=#algo-find-fr-size></a></h4>

0 commit comments

Comments
 (0)