quote-scoping-invalidation-002.html (937B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>CSS-contain test: style containment dynamic containment set unset invalidation</title> 4 <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> 5 <link rel="match" href="reference/quote-scoping-invalidation-002-ref.html"> 6 <link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-style"> 7 8 <style> 9 #root { 10 quotes: "A" "Z" "1" "9" "(" ")" "+" "-"; 11 } 12 #root::before, #root span::before { 13 content: open-quote; 14 } 15 #root::after { 16 content: close-quote; 17 } 18 .contain-style { 19 contain: style; 20 } 21 </style> 22 23 <p>Test passes if the text below is "A1(+-" (not including the quotation marks).<p> 24 <div id="root"> 25 <div id="scope"> 26 <span id="span1"></span> 27 <span id="span2"></span> 28 </div> 29 <span></span> 30 </div> 31 32 <script> 33 document.body.offsetTop; 34 scope.style.contain = "style"; 35 document.body.offsetTop; 36 scope.style.contain = ""; 37 </script>