The sizing of images in flex should take the dimension change caused by definite cross-size and aspect-ratio
Reported by
francois...@outlook.com,
Mar 22 2017
|
||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15049
Steps to reproduce the problem:
1. Define a width/height on a flex
2. Insert an image in it
3. Observe how its aspect-ratio affects its final size
What is the expected behavior?
Aspect-ratio should be preserved, except if the image is to be sized bigger than its normal size ("grow" test case). If it is, the flexing that takes place as a second step will shrink the image to fit the container.
The reason flexing is different is that flex-shrink is 1 by default and flex-grow is 0 by default. Flexing doesn't have to take the image aspect-ratio into consideration.
What went wrong?
Chrome uses the image size without considering the cross-size forces the image dimension to evolve to preserve its aspect-ratio.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 52.0.2743.116 Channel: n/a
OS Version: 10.0
Flash Version:
Please discuss this issue at https://github.com/w3c/csswg-drafts/issues/1112 if you disagree with the test results
,
Mar 24 2017
I wish you'd written the test in a way that I can see all the failures, not just the first one; that said, this does seem like a bug, thanks!
,
Mar 24 2017
Good feedback. The test is partially autogenerated and I am still tuning the code generator. I never considered this issue because I don't have it in my own workflow since I only use the generated test as an output, and the editor shows all assertions simultaneously. There is no particular reason to make these assertions depend on each other in this case. I will rethink this a bit.
,
Mar 24 2017
To add here what I posted in https://github.com/w3c/csswg-drafts/issues/1112#issuecomment-289154246 : There is definitely a bug that the aspect ratio should be respected but I am not sure that the specific sizes this test is asking for are correct. See comment there. |
||
►
Sign in to add a comment |
||
Comment 1 by cbiesin...@chromium.org
, Mar 24 2017