tor-browser

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

intrinsic-percent-replaced-017.html (1153B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
      4 <link rel="author" title="Mozilla" href="https://www.mozilla.org/">
      5 <link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
      6 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1910290">
      7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht">
      8 <meta name="assert" content="This test verifies that the inner div's used main size (height) serves as a percentage basis for the img's max-height. The img can transfer its max-height through the aspect-ratio to the inline axis when computing its intrinsic inline size contribution. This determines the inner div's used cross-size (width).">
      9 
     10 <style>
     11 .outer {
     12  display: flex;
     13  flex-direction: column;
     14  width: 100px;
     15  height: 100px;
     16  align-items: center;
     17 }
     18 .inner {
     19  max-height: 100%;
     20  background: red;
     21 }
     22 img {
     23  max-height: 100%;
     24 }
     25 </style>
     26 
     27 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     28 <div class="outer">
     29  <div class="inner">
     30    <img src="aspect-ratio/support/200x200-green.png">
     31  </div>
     32 </div>