tor-browser

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

grid-auto-min-sizing-min-content-min-size-004.html (2055B)


      1 <!DOCTYPE HTML>
      2 <!--
      3     Any copyright is dedicated to the Public Domain.
      4     https://creativecommons.org/publicdomain/zero/1.0/
      5 -->
      6 <html><head>
      7  <meta charset="utf-8">
      8  <title>CSS Grid Test: Testing track 'auto' min-sizing function with 'min-height:min-content' on an item with an intrinsic aspect ratio</title>
      9  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1218178">
     10  <link rel="help" href="https://drafts.csswg.org/css-grid/#min-size-auto">
     11  <link rel="match" href="grid-auto-min-sizing-min-content-min-size-004-ref.html">
     12  <style type="text/css">
     13 html,body { color:black; background-color:white; font:12px monospace; padding:0; margin:0; }
     14 body { overflow:hidden; }
     15 
     16 .grid {
     17  display: grid;
     18  float: left;
     19  border: 1px solid;
     20  align-items: start;
     21  justify-items: start;
     22  margin-bottom: 1em;
     23 }
     24 
     25 .row { grid-template-rows:minmax(auto,0.0001fr); }
     26 .row img {
     27  min-width: 0;
     28  min-height: -webkit-min-content;
     29  min-height: min-content;
     30 }
     31 
     32 br { clear:both; }
     33 
     34  </style>
     35 </head>
     36 <body>
     37 
     38 <script>
     39 var rowtest = [
     40 "width:50%; max-height:200%", "width:50%; height:200%", "width:4px; height:50%",
     41 "height:50%", "max-height:200%", "max-height:50%", "max-width:50%", "width:50%; height:12px",
     42 "min-width:80%; max-height:12px", "min-width:50%", "margin-left: 50px; width:50%"
     43 ];
     44 
     45 var h3 = document.createElement('h3');
     46 h3.appendChild(document.createTextNode("grid-template-rows:minmax(auto,0.0001fr)"));
     47 document.body.appendChild(h3);
     48 for (var i = 0; i < rowtest.length; ++i) {
     49  var grid = document.createElement('div');
     50  grid.setAttribute("class","grid row");
     51  var img = document.createElement('img');
     52  img.setAttribute("src","support/lime-2x24.png");
     53  img.setAttribute("style",rowtest[i]);
     54  grid.appendChild(img);
     55  document.body.appendChild(document.createTextNode(`Test ${i+1}: 24x2.png -- ${rowtest[i]}`));
     56  document.body.appendChild(document.createElement('br'));
     57  document.body.appendChild(grid);
     58  document.body.appendChild(document.createElement('br'));
     59 }
     60 </script>
     61 
     62 </body>
     63 </html>