quote-scoping-invalidation-004.html (1039B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>CSS-contain test: style containment invalidation with elements in different subtrees</title> 4 <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> 5 <link rel="match" href="reference/quote-scoping-invalidation-004-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 "A111119" (not including the quotation marks).<p> 24 <div id="root"> 25 <div class="contain-style"> 26 <span id="span1"></span> 27 <span id="span2"></span> 28 </div> 29 <div class="contain-style"> 30 <span id="span3"></span> 31 <span id="span4"></span> 32 </div> 33 <span></span> 34 </div> 35 36 <script> 37 document.body.offsetTop; 38 span1.className = "contain-style"; 39 span3.className = "contain-style"; 40 </script>