contain-body-w-m-004.html (856B)
1 <!doctype html> 2 <html lang=en> 3 <meta charset=utf-8> 4 <title>CSS-contain test: style containment on body prevents writing-mode 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 body prevents writing-mode propagation"> 8 <link rel="match" href="reference/contain-body-w-m-001-ref.html"> 9 <link rel=help href="https://drafts.csswg.org/css-contain-2/#contain-property"> 10 11 <style> 12 html::before { 13 content: ""; 14 width: 100px; 15 height: 100px; 16 background: orange; 17 display: block; 18 } 19 p { writing-mode: horizontal-tb; margin: 0;} 20 body { 21 margin: 0; 22 width: 200px; 23 height: 200px; 24 writing-mode: vertical-rl; 25 contain: style; 26 } 27 </style> 28 29 <p>Test passes if the orange square is in the upper-left corner.