flex-aspect-ratio-img-column-008.html (1058B)
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: Tests that padding % are resolved against parent's inline size when aspect ratio item doesn't have a definite cross size</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 justify-content: flex-start; 19 align-items: flex-start; 20 height: 200px; 21 writing-mode: vertical-lr; 22 } 23 24 img { 25 padding-left: 5%; 26 min-width: 40px; 27 min-height: 0; /* Disable min-size: auto. */ 28 margin-left: -10px; 29 } 30 </style> 31 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 style="width:60px; height: 100px; background: green; float: left;"></div> 36 <div class="flex"> 37 <img src="support/20x50-green.png"> 38 </div>