tor-browser

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

contain-size-025.html (2316B)


      1 <!DOCTYPE html>
      2 
      3  <meta charset="UTF-8">
      4 
      5  <title>CSS Containment Test: 'contain: size' applies to inline-block</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-025-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 2 in-flow block descendants made of images." 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
     35    {
     36      display: inline-block;
     37    }
     38 
     39  div#blue-test
     40    {
     41      background-color: blue;
     42      contain: size;
     43      padding: 50px;
     44    }
     45 
     46  span.block-descendant, img
     47    {
     48      display: block;
     49    }
     50 
     51  div#orange-reference
     52    {
     53      background-color: orange;
     54      height: 100px;
     55      width: 100px;
     56    }
     57  </style>
     58 
     59  <p>This test passes if the painted blue area is <strong>exactly as wide as</strong> the orange square.
     60 
     61  <div>
     62    <div id="blue-test" class="inline-block">
     63      <span class="block-descendant"><img src="support/blue50wBy25h.png" alt="Image download support must be enabled"></span>
     64      <span id="last-line-box" class="block-descendant"><img src="support/blue50wBy25h.png" alt="Image download support must be enabled"></span>
     65    </div>
     66  </div>
     67 
     68  <div id="orange-reference" class="inline-block"></div>