Re: [csswg-drafts] [css-grid] Stretching image grid items in both dimensions

OK, so, what I want to point out is that from an authoring point of 
view, the intrinsic aspect ratio should be preserved unless there's 
specific instructions not to. Maintaining the intrinsic aspect ratio 
trumps preserving the intrinsic size in any single dimension. Always. 
Changing a dimension effectively modifies the user-perceived 
"intrinsic size" in the other. Internally, we can define terms however
 we want, but I'm pretty sure that as far as the author is concerned, 
anywhere that we are failing to do this is an error.

An alignment value of 'center' is definitely not an instruction for 
`auto` sizing in that dimension to ignore the aspect ratio. Going back
 to when we did not have `normal`... the options for alignment were 
`stretch | start | end | center`. And if one axis was `stretch` and 
the other `center`  then the aspect ratio would have to be preserved. 
Only if `stretch` were specified in both axes would the aspect ratio 
be ignored: the intention of all non-`stretch` values of the alignment
 properties is to do the automatic thing that best preserves the 
intended presentation of the content, and would use extra space for 
the specified alignment. Shrink-to-fit sizing, in general, preserves 
the aspect ratio and Grid + Alignment should behave no different for 
the values that trigger it.

To address your feedback that the default behavior should be to 
preserve the aspect ratio, we decided to add an independent behavior 
for `normal` so that the initial behavior would not be the skewed 
result of `stretch stretch`. So `normal normal` is defined to be like 
`start start` except that the larger dimension is treated as `stretch`
 to `contain`-fit the item within the grid area. This shouldn't, 
however, cause the aspect ratio to be ignored by the 
previously-existing value combinations that were intended to honor it.

p.s. Fwiw, I'm a little concerned that the new `normal` complicates 
the field of values for the alignment properties by adding yet another
 sizing value, in particular one that gives a useful behavior but 
doesn't allow the alignment values to act upon it.

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

Received on Sunday, 27 November 2016 06:46:25 UTC