Re: [csswg-drafts] [css-grid] Automatic minimum size clamping by grid area should transfer through aspect ratio

Yes, I think this is a good idea for "transferred size".  Firefox 
currently doesn't do this -- we only clamp the intrinsic size, but 
that can lead to non-intuitive results since it may overflow the 
clamped axis when stretching an image with preserved ratio.

I don't think clamping should shrink an item below its specified 
`width/height` in the same axis though (as you seem to suggest, but 
maybe I misunderstood?).

I wonder if it would be better to define the grid area clamping in 
terms of `max-width/height` instead?
It's currently a bit undefined how clamping interacts with 
`min/max-width/height` (and over-constrained situations), even with 
your suggested additions above.
Something like "clamping acts as an extra max-size on the item in the 
relevant axis, that is, the used `max-width/height` is the minimum of 
the grid area size and the computed value of the relevant 
`max-width/height`, if any".
That makes it much better defined, since we re-use all spec text for 
`max-width/height`.  It's immediately clear that a specified larger 
`width/height` trumps the clamping, for example.
(Warning: I haven't really investigated this idea in depth.)

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

Received on Saturday, 26 November 2016 23:56:58 UTC