contain-html-dir-002.html (853B)
1 <!doctype html> 2 <html lang=en> 3 <meta charset=utf-8> 4 <title>CSS-contain test: paint containment on html prevents direction 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 direction 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-1/#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 { 20 margin: 0; 21 direction: ltr; 22 } 23 body { 24 margin: 0 auto 0 0; 25 width: 200px; 26 height: 200px; 27 direction: rtl; 28 } 29 html { 30 contain: paint; 31 } 32 </style> 33 34 <p>Test passes if the orange square is in the upper-left corner.