contain-paint-table-001.html (1132B)
1 <!DOCTYPE html> 2 3 <meta charset="UTF-8"> 4 5 <title>CSS Containment Test: 'contain: paint' applies to 'table' elements</title> 6 7 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 8 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> 9 <link rel="help" href="https://www.w3.org/TR/css-contain-1/#containment-paint"> 10 <link rel="match" href="reference/contain-paint-047-ref.html"> 11 12 <meta content="This test checks that paint containment applies to table elements. Therefore the content of the table element should be clipped to the padding edge of its principal box." name="assert"> 13 14 <style> 15 div#table 16 { 17 display: table; 18 font-family: monospace; 19 font-size: 100px; 20 table-layout: fixed; 21 width: 4ch; 22 contain: paint; 23 } 24 25 div.cell 26 { 27 display: table-cell; 28 color: green; 29 } 30 span 31 { 32 background-color: red; 33 color: yellow; 34 } 35 </style> 36 37 <p>Test passes if there is <strong>no red</strong>. 38 39 <div id="table"> 40 <div class="cell">PASS<span>FAIL</span></div> 41 </div>