Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
|
Manuel Rego
2016/04/22 12:57:04
I like the idea that you just use the same values
| |
| 2 | |
| 3 <link href="resources/grid.css" rel="stylesheet"> | |
| 4 <style> | |
| 5 | |
| 6 .grid { | |
| 7 border: 2px solid magenta; | |
| 8 height: 200px; | |
| 9 width: 25px; | |
| 10 align-content: start; | |
| 11 grid-auto-rows: 157px; | |
| 12 grid-auto-columns: 25px; | |
| 13 | |
| 14 float: left; | |
| 15 position: relative; | |
| 16 margin-right: 2px; | |
| 17 } | |
| 18 | |
| 19 .gridOnlyAutoRepeat { grid-template-rows: repeat(auto-fill, 30px [autobar]); } | |
| 20 .gridAutoRepeatAndFixedBefore { grid-template-rows: 10px [foo] 20% [bar] repeat( auto-fill, [autofoo] 35px); } | |
| 21 .gridAutoRepeatAndFixedAfter { grid-template-rows: repeat(auto-fill, [first] 30p x [last]) [foo] minmax(60px, 80px) [bar] minmax(45px, max-content); } | |
| 22 .gridAutoRepeatAndFixed { grid-template-rows: [start] repeat(2, 50px [a]) [middl e] repeat(auto-fill, [autofoo] 15px [autobar]) minmax(5%, 10%) [end]; } | |
| 23 .gridMultipleNames { grid-template-rows: [start] 20px [foo] 50% repeat(auto-fill , [bar] 20px [start foo]) [foo] 10% [end bar]; } | |
| 24 | |
| 25 .item { | |
| 26 background-color: cyan; | |
| 27 } | |
| 28 | |
| 29 .gap { | |
| 30 grid-row-gap: 20px; | |
| 31 grid-column-gap: 15px; | |
| 32 } | |
| 33 | |
| 34 </style> | |
| 35 | |
| 36 <script src="../../resources/testharness.js"></script> | |
| 37 <script src="../../resources/testharnessreport.js"></script> | |
| 38 <script src="../../resources/check-layout-th.js"></script> | |
| 39 | |
| 40 <body onload="checkLayout('.grid')"> | |
| 41 <div id="log"></div> | |
| 42 | |
| 43 <p>This test checks that repeat(auto-fill, ) syntax works as expected.</p> | |
| 44 | |
| 45 <div class="grid gridOnlyAutoRepeat"> | |
| 46 <div class="item" style="grid-row: 1 / span 6" data-offset-y="0" data-offset -x="0" data-expected-height="180" data-expected-width="25"></div> | |
| 47 </div> | |
| 48 | |
| 49 <div class="grid gridOnlyAutoRepeat"> | |
| 50 <div class="item" style="grid-row: 1 / span 6 autobar" data-offset-y="0" dat a-offset-x="0" data-expected-height="180" data-expected-width="25"></div> | |
| 51 </div> | |
| 52 | |
| 53 <div class="grid gridOnlyAutoRepeat gap"> | |
| 54 <div class="item" style="grid-row: 1 / span 5" data-offset-y="0" data-offset -x="0" data-expected-height="357" data-expected-width="25"></div> | |
| 55 </div> | |
| 56 | |
| 57 <div class="grid gridOnlyAutoRepeat gap"> | |
| 58 <div class="item" style="grid-row: autobar 2 / span 3" data-offset-y="100" d ata-offset-x="0" data-expected-height="257" data-expected-width="25"></div> | |
| 59 </div> | |
| 60 | |
| 61 <div class="grid gridAutoRepeatAndFixedBefore"> | |
| 62 <div class="item" style="grid-row: 1 / span 6" data-offset-y="0" data-offset -x="0" data-expected-height="190" data-expected-width="25"></div> | |
| 63 </div> | |
| 64 | |
| 65 <div class="grid gridAutoRepeatAndFixedBefore"> | |
| 66 <div class="item" style="grid-row: foo / autofoo" data-offset-y="10" data-of fset-x="0" data-expected-height="40" data-expected-width="25"></div> | |
| 67 </div> | |
| 68 | |
| 69 <div class="grid gridAutoRepeatAndFixedBefore"> | |
| 70 <div class="item" style="grid-row: bar / 5 autofoo" data-offset-y="50" data- offset-x="0" data-expected-height="297" data-expected-width="25"></div> | |
| 71 </div> | |
| 72 | |
| 73 <div class="grid gridAutoRepeatAndFixedBefore gap"> | |
| 74 <div class="item" style="grid-row: 1 / span 4" data-offset-y="0" data-offset -x="0" data-expected-height="180" data-expected-width="25"></div> | |
| 75 </div> | |
| 76 | |
| 77 <div class="grid gridAutoRepeatAndFixedBefore gap"> | |
| 78 <div class="item" style="grid-row: span 3 / 2 autofoo" data-offset-y="0" dat a-offset-x="0" data-expected-height="125" data-expected-width="25"></div> | |
| 79 </div> | |
| 80 | |
| 81 <div class="grid gridAutoRepeatAndFixedBefore gap"> | |
| 82 <div class="item" style="grid-row: notPresent / 3 autofoo" data-offset-y="37 7" data-offset-x="0" data-expected-height="157" data-expected-width="25"></div> | |
| 83 </div> | |
| 84 | |
| 85 <div class="grid gridAutoRepeatAndFixedAfter"> | |
| 86 <div class="item" style="grid-row: 1 / span 4" data-offset-y="0" data-offset -x="0" data-expected-height="185" data-expected-width="25"></div> | |
| 87 </div> | |
| 88 | |
| 89 <div class="grid gridAutoRepeatAndFixedAfter"> | |
| 90 <div class="item" style="grid-row: first / last 2" data-offset-y="0" data-of fset-x="0" data-expected-height="60" data-expected-width="25"></div> | |
| 91 </div> | |
| 92 | |
| 93 <div class="grid gridAutoRepeatAndFixedAfter"> | |
| 94 <div class="item" style="grid-row: last 2 / foo" data-offset-y="60" data-off set-x="0" data-expected-height="80" data-expected-width="25"></div> | |
| 95 </div> | |
| 96 | |
| 97 <div class="grid gridAutoRepeatAndFixedAfter gap"> | |
| 98 <div class="item" style="grid-row: 1 / span 3" data-offset-y="0" data-offset -x="0" data-expected-height="195" data-expected-width="25"></div> | |
| 99 </div> | |
| 100 | |
| 101 <div class="grid gridAutoRepeatAndFixedAfter gap"> | |
| 102 <div class="item" style="grid-row: 3 / span 1 bar" data-offset-y="130" data- offset-x="0" data-expected-height="222" data-expected-width="25"></div> | |
| 103 </div> | |
| 104 | |
| 105 <div class="grid gridAutoRepeatAndFixedAfter gap"> | |
| 106 <div class="item" style="grid-row: first / foo" data-offset-y="0" data-offse t-x="0" data-expected-height="30" data-expected-width="25"></div> | |
| 107 </div> | |
| 108 | |
| 109 <div class="grid gridAutoRepeatAndFixed"> | |
| 110 <div class="item" style="grid-row: 1 / span 8" data-offset-y="0" data-offset -x="0" data-expected-height="195" data-expected-width="25"></div> | |
| 111 </div> | |
| 112 | |
| 113 <div class="grid gridAutoRepeatAndFixed"> | |
| 114 <div class="item" style="grid-row: a / autobar 2" data-offset-y="50" data-of fset-x="0" data-expected-height="80" data-expected-width="25"></div> | |
| 115 </div> | |
| 116 | |
| 117 <div class="grid gridAutoRepeatAndFixed"> | |
| 118 <div class="item" style="grid-row: autofoo / end" data-offset-y="100" data-o ffset-x="0" data-expected-height="95" data-expected-width="25"></div> | |
| 119 </div> | |
| 120 | |
| 121 <div class="grid gridAutoRepeatAndFixed gap"> | |
| 122 <div class="item" style="grid-row: 1 / span 4" data-offset-y="0" data-offse t-x="0" data-expected-height="195" data-expected-width="25"></div> | |
| 123 </div> | |
| 124 | |
| 125 <div class="grid gridAutoRepeatAndFixed gap"> | |
| 126 <div class="item" style="grid-row: autobar / -1" data-offset-y="175" data-o ffset-x="0" data-expected-height="20" data-expected-width="25"></div> | |
| 127 </div> | |
| 128 | |
| 129 <div class="grid gridMultipleNames"> | |
| 130 <div class="item" style="grid-row: 1 / -1" data-offset-y="0" data-offset-x= "0" data-expected-height="200" data-expected-width="25"></div> | |
| 131 </div> | |
| 132 | |
| 133 <div class="grid gridMultipleNames"> | |
| 134 <div class="item" style="grid-row: foo 3 / 4 bar" data-offset-y="160" data- offset-x="0" data-expected-height="40" data-expected-width="25"></div> | |
| 135 </div> | |
| 136 | |
| 137 <div class="grid gridMultipleNames"> | |
| 138 <div class="item" style="grid-row: -6 / span 2 start" data-offset-y="20" da ta-offset-x="0" data-expected-height="140" data-expected-width="25"></div> | |
| 139 </div> | |
| 140 | |
| 141 <div class="grid gridMultipleNames gap"> | |
| 142 <div class="item" style="grid-row: -4 / -2" data-offset-y="40" data-offset- x="0" data-expected-height="140" data-expected-width="25"></div> | |
| 143 </div> | |
| 144 | |
| 145 <div class="grid gridMultipleNames gap"> | |
| 146 <div class="item" style="grid-row: bar / foo 2" data-offset-y="160" data-of fset-x="0" data-expected-height="20" data-expected-width="25"></div> | |
| 147 </div> | |
| 148 | |
| 149 <div class="grid gridMultipleNames gap"> | |
| 150 <div class="item" style="grid-row: foo / bar 2" data-offset-y="40" data-off set-x="0" data-expected-height="180" data-expected-width="25"></div> | |
| 151 </div> | |
| 152 | |
| 153 </body> | |
| OLD | NEW |