replaced-element-034.html (777B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio"> 3 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht" /> 4 <style> 5 img { 6 background: green; 7 box-sizing: border-box; 8 aspect-ratio: 1/1; 9 padding-left: 50px; 10 height: min-content; 11 } 12 </style> 13 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 14 <!-- 15 This test is super subtle. The SVG has a natural (content) size of 50x??. 16 To determine the natural (content) height we use the aspect-ratio to 17 multiply through, but we should be using "box-sizing: border-box". 18 This leaves "height: min-content" to be 100px (as opposed to 50px). 19 --> 20 <img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='50px'></svg>">