contain-html-overflow-004.html (724B)
1 <!doctype html> 2 <html lang=en> 3 <meta charset=utf-8> 4 <title>CSS-contain test: style containment on html prevents overflow propagation</title> 5 <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net"> 6 <meta name=flags content=""> 7 <meta name=assert content="style containment on html prevents overflow propagation"> 8 <link rel="match" href="reference/contain-body-overflow-001-ref.html"> 9 <link rel=help href="https://drafts.csswg.org/css-contain-2/#contain-property"> 10 11 <style> 12 html, body, p, div { 13 margin: 0; 14 width: 200px; 15 height: 200px; 16 } 17 div { background: red; } 18 body { 19 overflow: hidden; 20 } 21 html { 22 contain: style; 23 } 24 </style> 25 26 <p>Test passes if there is no red. 27 28 <div></div>