flex-aspect-ratio-img-row-003.html (1358B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Flexible Box Test: Aspect ratio handling of images</title> 5 <link rel="author" title="Google Inc." href="http://www.google.com/" /> 6 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#algo-cross-item" /> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> 8 <meta name="assert" content="Test that we compute the correct aspect-ratio based cross size when a flex-basis is specified" /> 9 <style type="text/css"> 10 #reference-overlapped-red { 11 position: absolute; 12 background-color: red; 13 width: 100px; 14 height: 100px; 15 z-index: -1; 16 } 17 18 #constrained-flex { 19 display: flex; 20 width: 10px; 21 } 22 23 img { 24 min-width: 0; 25 min-height: 0; 26 flex: none; 27 flex-basis: 100px; 28 } 29 </style> 30 </head> 31 <body> 32 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 33 34 <div id="reference-overlapped-red"></div> 35 <div id="constrained-flex"> 36 <img id="test-flex-item-overlapping-green" src="support/100x100-green.png" /> 37 </div> 38 </body> 39 </html>