tor-browser

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

intrinsic-size-010.html (2197B)


      1 <!DOCTYPE html>
      2 <title>CSS aspect-ratio: min-content size keyword together with min-size</title>
      3 <link rel="author" title="Mozilla" href="https://www.mozilla.org/">
      4 <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">
      5 <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum">
      6 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5032">
      7 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht" />
      8 <style>
      9 .target {
     10  background: green;
     11 }
     12 </style>
     13 
     14 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     15 
     16 <!-- The tests below are based on the discussion:
     17     https://github.com/w3c/csswg-drafts/issues/5032#issuecomment-655637111 -->
     18 
     19 <!-- `min-width:auto` takes the content size into account.
     20     `width: min-content` is resolved as 25px (= 25px * 1), and the content size
     21     is 100px, so the final width should be max(25px, 100px) = 100px. -->
     22 <div class="target" style="height: 25px; width: min-content; min-width: auto; aspect-ratio: 1/1;">
     23  <div style="width: 100px;"></div>
     24 </div>
     25 <!-- `min-width:min-content` doesn't take the content size into account.
     26     `width:auto` is resolved as 100px (= 25px * 4), and it shouldn't be
     27     floored by the content size (i.e. 150px), so the final width is 100px. -->
     28 <div class= "target" style="height: 25px; width: auto; min-width: min-content; aspect-ratio: 4/1;">
     29  <div style="width: 150px;"></div>
     30 </div>
     31 
     32 <!-- `min-height:auto` takes the content size into account.
     33     `height: min-content` is resolved as 10px (= 100px / 10), and the content
     34     size is 25px, so the final height should be max(10px, 25px) = 25px. -->
     35 <div class="target" style="height: min-content; min-height: auto; width: 100px; aspect-ratio: 10/1;">
     36  <div style="height: 25px;"></div>
     37 </div>
     38 <!-- `min-height:min-content` doesn't take content size into account.
     39     `height:auto` is resolved as 25px (= 100px / 4), and it shouldn't be
     40     floored by the content size (i.e. 50px), so the final height is 25px. -->
     41 <div class="target" style="height: auto; min-height: min-content; width: 100px; aspect-ratio: 4/1;">
     42  <div style="height: 50px;"></div>
     43 </div>