tor-browser

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

grid-auto-min-sizing-transferred-size-004.html (1979B)


      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:auto' 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-transferred-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 { min-width:0; }
     27 
     28 br { clear:both; }
     29 
     30  </style>
     31 </head>
     32 <body>
     33 
     34 <script>
     35 var rowtest = [
     36 "width:50%; max-height:200%", "width:50%; height:200%", "width:4px; height:50%",
     37 "height:50%", "max-height:200%", "max-height:50%", "max-width:50%", "width:50%; height:12px",
     38 "min-width:80%; max-height:12px", "min-width:50%", "margin-left: 50px; width:50%"
     39 ];
     40 
     41 var h3 = document.createElement('h3');
     42 h3.appendChild(document.createTextNode("grid-template-rows:minmax(auto,0.0001fr)"));
     43 document.body.appendChild(h3);
     44 for (var i = 0; i < rowtest.length; ++i) {
     45  var grid = document.createElement('div');
     46  grid.setAttribute("class","grid row");
     47  var img = document.createElement('img');
     48  img.setAttribute("src","support/lime-2x24.png");
     49  img.setAttribute("style",rowtest[i]);
     50  grid.appendChild(img);
     51  document.body.appendChild(document.createTextNode(`Test ${i+1}: 2x24.png -- ${rowtest[i]}`));
     52  document.body.appendChild(document.createElement('br'));
     53  document.body.appendChild(grid);
     54  document.body.appendChild(document.createElement('br'));
     55 }
     56 </script>
     57 
     58 </body>
     59 </html>