flex-aspect-ratio-img-column-009.html (1013B)
1 <!DOCTYPE html> 2 <link rel="author" title="Google LLC" href="http://www.google.com" /> 3 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#line-sizing" /> 4 <title>css-flexbox: multiplying integers by the aspect ratio doesn't accumulate rounding errors</title> 5 <link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> 6 7 <style> 8 #reference-overlapped-red { 9 position: absolute; 10 background-color: red; 11 width: 100px; 12 height: 100px; 13 z-index: -1; 14 } 15 16 .flex { 17 display: flex; 18 flex-direction: column; 19 justify-content: flex-start; 20 align-items: flex-start; 21 float: left; 22 } 23 24 img { 25 min-width: 0; 26 min-height: 0; /* Disable min-size: auto so we don't have to think about it. */ 27 width: 40px; 28 } 29 </style> 30 31 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 32 33 <div id="reference-overlapped-red"></div> 34 <div style="width:60px; height: 100px; background: green; float: left;"></div> 35 <div class="flex"> 36 <img src="support/20x50-green.png"> 37 </div>