contain-layout-ignored-cases-no-principal-box-002.html (936B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Test: 'contain: layout' element should not contain absolute/fixed position elements when no principal box is generated.</title> 6 <link rel="author" title="Yusuf Sermet" href="mailto:ysermet@mozilla.com"> 7 <link rel="author" title="Morgan Rae Reschenberg" href="mailto:mreschenberg@berkeley.edu"> 8 <link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout"> 9 <link rel="match" href="contain-layout-ignored-cases-no-principal-box-002-ref.html"> 10 <style> 11 #a { 12 contain: layout; 13 display: contents; 14 width: 100px; 15 height: 100px; 16 background: red; 17 margin: 50px; 18 } 19 #b { 20 position: absolute; 21 top: 0; 22 left: 0; 23 width: 100px; 24 height: 100px; 25 background: green; 26 } 27 </style> 28 </head> 29 <body> 30 <div id="a"> 31 <div> 32 <div id="b"></div> 33 </div> 34 </div> 35 </body> 36 </html>