Re: [csswg-drafts] [css-grid-2] Allow fr units as min

If we don't allow keywords in the max position, this should just mean we freeze out tracks during Expand Flexible Tracks, kinda like we do for flex items when flexing. I don't think any other changes are needed--other than capping the auto minimum at the specified max--so it should be pretty straightforward to add to the algorithm.

If we need the content-based keywords as maxes, then it gets more complicated because we have to compute those. But also ignore that they exit during Maximize Tracks. But it doesn't seem likely that we need those, though: if you want fr units, you generally don't want to max out at a content-based value, you want to cap out at something with a predictable relationship to other tracks in the grid.

Probably need to wait until Grid 2 Revision 2 is done to port over the algorithm, but otherwise I think the above outlines what we need to do.
- Allow `<flex>` as a minimum, together with a `<length-percentage>` max. (Or maybe just a `<length>`, because I hate percentages, heh. Also why are you using a percentage if you're using fr units?)
- `<flex>` minimum implies `auto` minimum, which needs to be capped by the max.
- Freeze out tracks as they hit their max, just like in Flexbox.

Open Questions:
- Should we allow `<percentage>` in the max position? It's not that hard to define, but it's added work to implement and test and seems of limited usefulness.
- Do we need content-based keywords in the max position?
- Should we add the 3-argument syntax to allow for a non-`auto` min?

I'm inclined to start with the most minimal featureset and see what people complain about as being missing.

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2611#issuecomment-386469857 using your GitHub account

Received on Thursday, 3 May 2018 23:48:50 UTC