contain-html-overflow-002.html (743B)
1 <!doctype html> 2 <html lang=en> 3 <meta charset=utf-8> 4 <title>CSS-contain test: paint 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="paint 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-1/#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 height: 400px; 23 contain: paint; 24 } 25 </style> 26 27 <p>Test passes if there is no red. 28 29 <div></div>