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-003.html (1939B)


      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-003-ref.html">
     12  <style type="text/css">
     13 html,body { color:black; background-color:white; font:12px monospace; padding:0; margin:0; }
     14 
     15 .grid {
     16  display: grid;
     17  float: left;
     18  border: 1px solid;
     19  align-items: start;
     20  justify-items: start;
     21  margin-bottom: 1em;
     22 }
     23 
     24 .row { grid-template-rows:minmax(auto,0.0001fr); }
     25 .row img { min-width:0; }
     26 
     27 br { clear:both; }
     28 
     29  </style>
     30 </head>
     31 <body>
     32 
     33 <script>
     34 var rowtest = [
     35 "width:12px; max-height:48px", "width:12px; height:48px", "width:4px; height:12px",
     36 "height:12px", "max-height:48px", "max-height:12px", "width:1px", "max-width:1px",
     37 "width:1px; height:20px", "min-width:3px", "min-width:5px; max-height:30px"
     38 ];
     39 
     40 var h3 = document.createElement('h3');
     41 h3.appendChild(document.createTextNode("grid-template-rows:minmax(auto,0.0001fr)"));
     42 document.body.appendChild(h3);
     43 for (var i = 0; i < rowtest.length; ++i) {
     44  var grid = document.createElement('div');
     45  grid.setAttribute("class","grid row");
     46  var img = document.createElement('img');
     47  img.setAttribute("src","support/lime-2x24.png");
     48  img.setAttribute("style",rowtest[i]);
     49  grid.appendChild(img);
     50  document.body.appendChild(document.createTextNode(`Test ${i+1}: 2x24.png -- ${rowtest[i]}`));
     51  document.body.appendChild(document.createElement('br'));
     52  document.body.appendChild(grid);
     53  document.body.appendChild(document.createElement('br'));
     54 }
     55 </script>
     56 
     57 </body>
     58 </html>