Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <link href="resources/grid.css" rel="stylesheet"> | 3 <link href="resources/grid.css" rel="stylesheet"> |
| 4 <style> | 4 <style> |
| 5 | 5 |
| 6 .grid { | 6 .grid { |
| 7 border: 2px solid magenta; | 7 border: 2px solid magenta; |
| 8 height: 200px; | 8 height: 200px; |
| 9 width: 25px; | 9 width: 25px; |
| 10 align-content: start; | 10 align-content: start; |
| 11 grid-auto-rows: 157px; | 11 grid-auto-rows: 157px; |
| 12 grid-auto-columns: 25px; | 12 grid-auto-columns: 25px; |
| 13 | 13 |
| 14 float: left; | 14 float: left; |
| 15 position: relative; | 15 position: relative; |
| 16 margin-right: 2px; | 16 margin-right: 2px; |
| 17 } | 17 } |
| 18 | 18 |
| 19 .gridOnlyAutoRepeat { grid-template-rows: repeat(auto-fill, 30px [autobar]); } | 19 .gridOnlyAutoRepeat { grid-template-rows: repeat(auto-fill, 30px [autobar]); } |
| 20 .gridAutoRepeatAndFixedBefore { grid-template-rows: 10px [foo] 20% [bar] repeat( auto-fill, [autofoo] 35px); } | 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); } | 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]; } | 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]; } | 23 .gridMultipleNames { grid-template-rows: [start] 20px [foo] 50% repeat(auto-fill , [bar] 20px [start foo]) [foo] 10% [end bar]; } |
| 24 .gridMultipleTracks { grid-template-rows: [start] 20px repeat(auto-fill, [a] 2em [b c] 10% [d]) [e] minmax(75px, 1fr) [last]; } | 24 .gridMultipleTracks { grid-template-rows: [start] 20px repeat(auto-fill, [a] 2em [b c] 10% [d]) [e] minmax(75px, 1fr) [last]; } |
| 25 | 25 |
| 26 .item { background-color: cyan; } | 26 .item { background-color: blue; } |
| 27 .item:nth-child(2) { background: green; } | |
| 28 .item:nth-child(3) { background: orange; } | |
| 27 | 29 |
| 28 .gap { grid-row-gap: 20px; } | 30 .gap { grid-row-gap: 20px; } |
| 29 | 31 |
| 30 </style> | 32 </style> |
| 31 | 33 |
| 32 <script src="../../resources/testharness.js"></script> | 34 <script src="../../resources/testharness.js"></script> |
| 33 <script src="../../resources/testharnessreport.js"></script> | 35 <script src="../../resources/testharnessreport.js"></script> |
| 34 <script src="../../resources/check-layout-th.js"></script> | 36 <script src="../../resources/check-layout-th.js"></script> |
| 35 | 37 |
| 36 <body onload="checkLayout('.grid')"> | 38 <body onload="checkLayout('.grid')"> |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 47 </div> | 49 </div> |
| 48 | 50 |
| 49 <div class="grid gridOnlyAutoRepeat gap"> | 51 <div class="grid gridOnlyAutoRepeat gap"> |
| 50 <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> | 52 <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> |
| 51 </div> | 53 </div> |
| 52 | 54 |
| 53 <div class="grid gridOnlyAutoRepeat gap"> | 55 <div class="grid gridOnlyAutoRepeat gap"> |
| 54 <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> | 56 <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> |
| 55 </div> | 57 </div> |
| 56 | 58 |
| 59 <div class="grid gridOnlyAutoRepeat gap" style="height: auto; max-height: 90px;" data-expected-height="94" data-expected-width="29"> | |
| 60 <div class="item" data-offset-y="0" data-offset-x="0" data-expected-height=" 30" data-expected-width="25"></div> | |
| 61 <div class="item" data-offset-y="50" data-offset-x="0" data-expected-height= "30" data-expected-width="25"></div> | |
| 62 <div class="item" data-offset-y="100" data-offset-x="0" data-expected-height ="157" data-expected-width="25"></div> | |
| 63 </div> | |
| 64 | |
| 65 <div class="grid gridOnlyAutoRepeat gap" style="height: auto; max-height: 90px; min-height: 130px;" data-expected-height="134" data-expected-width="29"> | |
| 66 <div class="item" data-offset-y="0" data-offset-x="0" data-expected-height=" 30" data-expected-width="25"></div> | |
| 67 <div class="item" data-offset-y="50" data-offset-x="0" data-expected-height= "30" data-expected-width="25"></div> | |
| 68 <div class="item" data-offset-y="100" data-offset-x="0" data-expected-height ="30" data-expected-width="25"></div> | |
| 69 </div> | |
|
Manuel Rego
2016/10/14 08:10:19
Wouldn't be nice to have the same tests for column
svillar
2016/10/14 12:46:36
OK I can add them too.
| |
| 70 | |
| 57 <div class="grid gridAutoRepeatAndFixedBefore"> | 71 <div class="grid gridAutoRepeatAndFixedBefore"> |
| 58 <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> | 72 <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> |
| 59 </div> | 73 </div> |
| 60 | 74 |
| 61 <div class="grid gridAutoRepeatAndFixedBefore"> | 75 <div class="grid gridAutoRepeatAndFixedBefore"> |
| 62 <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> | 76 <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> |
| 63 </div> | 77 </div> |
| 64 | 78 |
| 65 <div class="grid gridAutoRepeatAndFixedBefore"> | 79 <div class="grid gridAutoRepeatAndFixedBefore"> |
| 66 <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> | 80 <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> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 <div class="item" style="grid-row: a / 2 c" data-offset-y="20" data-offset- x="0" data-expected-height="84" data-expected-width="25"></div> | 164 <div class="item" style="grid-row: a / 2 c" data-offset-y="20" data-offset- x="0" data-expected-height="84" data-expected-width="25"></div> |
| 151 <div class="item" style="grid-row: 3 / e; grid-column: 2;" data-offset-y="5 2" data-offset-x="25" data-expected-height="72" data-expected-width="25"></div> | 165 <div class="item" style="grid-row: 3 / e; grid-column: 2;" data-offset-y="5 2" data-offset-x="25" data-expected-height="72" data-expected-width="25"></div> |
| 152 </div> | 166 </div> |
| 153 | 167 |
| 154 <div class="grid gridMultipleTracks gap"> | 168 <div class="grid gridMultipleTracks gap"> |
| 155 <div class="item" style="grid-row: a / c" data-offset-y="40" data-offset-x= "0" data-expected-height="32" data-expected-width="25"></div> | 169 <div class="item" style="grid-row: a / c" data-offset-y="40" data-offset-x= "0" data-expected-height="32" data-expected-width="25"></div> |
| 156 <div class="item" style="grid-row: 3 / last; grid-column: 2;" data-offset-y ="92" data-offset-x="25" data-expected-height="115" data-expected-width="25"></d iv> | 170 <div class="item" style="grid-row: 3 / last; grid-column: 2;" data-offset-y ="92" data-offset-x="25" data-expected-height="115" data-expected-width="25"></d iv> |
| 157 </div> | 171 </div> |
| 158 | 172 |
| 159 </body> | 173 </body> |
| OLD | NEW |