intrinsic-percent-replaced-021.html (834B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> 4 <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> 5 <link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes"> 6 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1919220"> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 8 <meta name="assert" content="This test verifies that button's width is the same as the img's width, transferred from the img's height and aspect-ratio."> 9 10 <style> 11 button { 12 padding: 0; 13 border: 0; 14 height: 100px; 15 background: red; 16 } 17 img { 18 height: 100%; 19 } 20 </style> 21 22 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 23 <button> 24 <img src="aspect-ratio/support/200x200-green.png"> 25 </button>