contain-size-replaced-003b.html (1816B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Containment Test: intrinsic size of size-contained replaced elems, with explicit max-content width</title> 4 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 5 <link rel="author" href="https://mozilla.org" title="Mozilla"> 6 <link rel="help" href="https://drafts.csswg.org/css-contain/#containment-size"> 7 <link rel="match" href="contain-size-replaced-003-ref.html"> 8 <meta name=assert content="This test checks that various size-contained replaced elements have an intrinsic size of 0,0 regardless of their content."> 9 <style> 10 video, audio, canvas, svg, img, embed, object, iframe { 11 border: 3px solid teal; 12 contain: size; 13 margin: 15px; 14 width: max-content; /* This means 0, given 'contain:size'. */ 15 height: auto; 16 } 17 </style> 18 <body> 19 <!-- video element: --> 20 <video></video> 21 <video controls></video> 22 <video poster="support/blue-100x100.png"></video> 23 <video poster="support/blue-100x100.png" controls></video> 24 <video src="support/white.webm" controls></video> 25 <video src="support/white.webm" controls></video> 26 <br> 27 28 <!-- audio element with controls, and a few other misc replaced elements: --> 29 <audio controls></audio> 30 <canvas></canvas> 31 <svg></svg> 32 <br> 33 34 <!-- Image elements: --> 35 <img src="broken"> 36 <img src="support/blue-100x100.png"> 37 <picture><source srcset="support/blue-100x100.png"><img></picture> 38 <br> 39 40 <!-- Document-embedding elements (with & without a target resource that 41 could provide an intrinsic ratio in some cases, in the absence of 42 contain:size): --> 43 <embed> 44 <embed src="support/blue-100x100.png"> 45 <object></object> 46 <object data="support/blue-100x100.png"></object> 47 <iframe></iframe> 48 <iframe src="support/blue-100x100.png"></iframe> 49 <br> 50 </body>