tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

contain-size-021.html (2014B)


      1 <!DOCTYPE html>
      2 
      3  <meta charset="UTF-8">
      4 
      5  <title>CSS Containment Test: 'contain: size' applies to inline-block (basic)</title>
      6 
      7  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
      8  <link rel="help" href="https://www.w3.org/TR/css-contain-1/#containment-size">
      9  <link rel="match" href="reference/contain-size-021-ref.html">
     10 
     11  <meta content="This test checks that when laying out an inline-block element with 'contain: size', the inline-block element must be treated as if it would have no contents. In this test, the inline-block element has 1 image and no in-flow block descendant." name="assert">
     12 
     13  <!--
     14 
     15  contain-size-021: inline-block with 1 image and no in-flow block descendant: width comparison
     16 
     17  contain-size-022: inline-block with 1 image and no in-flow block descendant: height comparison
     18 
     19  contain-size-023: inline-block with text and no in-flow block descendant: width comparison
     20 
     21  contain-size-024: inline-block with text and no in-flow block descendant: height comparison
     22 
     23  contain-size-025: inline-block and 2 in-flow block descendants made of images: width comparison
     24 
     25  contain-size-026: inline-block and 2 in-flow block descendants made of images: height comparison
     26 
     27  contain-size-027: inline-block and 2 in-flow block descendants made of text: width comparison
     28 
     29  contain-size-028: inline-block and 2 in-flow block descendants made of text: height comparison
     30 
     31  -->
     32 
     33  <style>
     34  div#inline-block-blue-test
     35    {
     36      background-color: blue;
     37      contain: size;
     38      display: inline-block;
     39      padding: 50px;
     40    }
     41 
     42  div#orange-reference
     43    {
     44      background-color: orange;
     45      height: 100px;
     46      width: 100px;
     47    }
     48  </style>
     49 
     50  <p>This test passes if the painted blue area is <strong>exactly as wide as</strong> the orange square.
     51 
     52  <div>
     53    <div id="inline-block-blue-test"><img src="support/blue50wBy46h.png" alt="Image download support must be enabled"></div>
     54  </div>
     55 
     56  <div id="orange-reference"></div>