Bug 1298550 - Re-enable the now-passing part of grid-percent-grid-gap-001.html. r...
[gecko.git] / layout / reftests / css-grid / grid-auto-min-sizing-min-content-min-size-004-ref.html
blob6533c97b67a986841de3388bc3a3cbb458a62d6f
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>Reference: 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 <style type="text/css">
11 html,body { color:black; background-color:white; font:12px monospace; padding:0; margin:0; }
12 body { overflow:hidden; }
14 .grid {
15 display: grid;
16 float: left;
17 border: 1px solid;
18 align-items: start;
19 justify-items: start;
20 margin-bottom:1em;
23 .row { }
24 .row img { min-width:0; }
26 br { clear:both; }
28 </style>
29 </head>
30 <body>
32 <script>
33 var rowtest = [
34 "width:50%; max-height:200%", "width:50%; height:200%", "width:4px; height:50%",
35 "height:50%", "max-height:200%", "max-height:50%", "max-width:50%", "width:50%; height:20px",
36 "min-width:80%; max-height:20px", "min-width:50%", "margin-left: 50px; width:50%"
38 var results = [
39 "0/2px", "0/2px", "0/4px", "0/2px", "0/2px", "0/2px", "12px/2px", "20px/2px", "20px/2px", "24px/2px", "312px/52px"
41 var item_height = [
42 "0", "0", "0", "0", "0", "0", "12px", "20px", "20px", "24px", "312px"
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 grid.setAttribute("style","grid:" + results[i]);
52 var img = document.createElement('img');
53 img.setAttribute("src","support/lime-2x24.png");
54 img.setAttribute("style",rowtest[i] + "; max-height:auto; height:"+ item_height[i]);
55 grid.appendChild(img);
56 document.body.appendChild(document.createTextNode("2x24.png -- "+rowtest[i]+'\n'));
57 document.body.appendChild(document.createElement('br'));
58 document.body.appendChild(grid);
59 document.body.appendChild(document.createElement('br'));
61 </script>
63 </body>
64 </html>