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 width: 200px; | 8 width: 200px; |
| 9 position: relative; | 9 position: relative; |
| 10 justify-content: start; | 10 justify-content: start; |
| 11 grid-auto-columns: 157px; | 11 grid-auto-columns: 157px; |
| 12 grid-auto-rows: 25px; | 12 grid-auto-rows: 25px; |
| 13 } | 13 } |
| 14 | 14 |
| 15 .gridOnlyAutoRepeat { grid-template-columns: repeat(auto-fit, 30px [autobar]); } | 15 .gridOnlyAutoRepeat { grid-template-columns: repeat(auto-fit, 30px [autobar]); } |
| 16 .gridAutoRepeatAndFixedBefore { grid-template-columns: 10px [foo] 20% [bar] repe at(auto-fit, [autofoo] 35px); } | 16 .gridAutoRepeatAndFixedBefore { grid-template-columns: 10px [foo] 20% [bar] repe at(auto-fit, [autofoo] 35px); } |
| 17 .gridAutoRepeatAndFixedAfter { grid-template-columns: repeat(auto-fit, [first] 3 0px [last]) [foo] minmax(60px, 80px) [bar] minmax(45px, max-content); } | 17 .gridAutoRepeatAndFixedAfter { grid-template-columns: repeat(auto-fit, [first] 3 0px [last]) [foo] minmax(60px, 80px) [bar] minmax(45px, max-content); } |
| 18 .gridAutoRepeatAndFixed { grid-template-columns: [start] repeat(2, 50px [a]) [mi ddle] repeat(auto-fit, [autofoo] 15px [autobar]) minmax(5%, 10%) [end]; } | 18 .gridAutoRepeatAndFixed { grid-template-columns: [start] repeat(2, 50px [a]) [mi ddle] repeat(auto-fit, [autofoo] 15px [autobar]) minmax(5%, 10%) [end]; } |
| 19 .gridMultipleNames { grid-template-columns: [start] 20px [foo] 50% repeat(auto-f it, [bar] 20px [start foo]) [foo] 10% [end bar]; } | 19 .gridMultipleNames { grid-template-columns: [start] 20px [foo] 50% repeat(auto-f it, [bar] 20px [start foo]) [foo] 10% [end bar]; } |
| 20 .gridMultipleTracks { grid-template-columns: [start] 20px repeat(auto-fit, [a] 2 em [b c] 10% [d]) [e] minmax(75px, 1fr) [last]; } | 20 .gridMultipleTracks { grid-template-columns: [start] 20px repeat(auto-fit, [a] 2 em [b c] 10% [d]) [e] minmax(75px, 1fr) [last]; } |
| 21 .gridMinMaxFixedFlex { grid-template-columns: repeat(auto-fit, minmax(50px, 1fr) ); } | |
| 21 | 22 |
| 22 .item { background-color: cyan; } | 23 .item { background-color: cyan; } |
| 23 .item:nth-child(2n) { background-color: green; } | 24 .item:nth-child(2n) { background-color: green; } |
| 24 | 25 |
| 25 .gap { grid-column-gap: 20px; } | 26 .gap { grid-column-gap: 20px; } |
| 26 | 27 |
| 27 </style> | 28 </style> |
| 28 | 29 |
| 29 <script src="../../resources/testharness.js"></script> | 30 <script src="../../resources/testharness.js"></script> |
| 30 <script src="../../resources/testharnessreport.js"></script> | 31 <script src="../../resources/testharnessreport.js"></script> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 | 146 |
| 146 <div class="grid gridMultipleTracks"> | 147 <div class="grid gridMultipleTracks"> |
| 147 <div class="item" style="grid-column: e / last;" data-offset-x="52" data-of fset-y="0" data-expected-width="148" data-expected-height="25"></div> | 148 <div class="item" style="grid-column: e / last;" data-offset-x="52" data-of fset-y="0" data-expected-width="148" data-expected-height="25"></div> |
| 148 <div class="item" style="grid-column: start / b;" data-offset-x="0" data-of fset-y="25" data-expected-width="52" data-expected-height="25"></div> | 149 <div class="item" style="grid-column: start / b;" data-offset-x="0" data-of fset-y="25" data-expected-width="52" data-expected-height="25"></div> |
| 149 </div> | 150 </div> |
| 150 | 151 |
| 151 <div class="grid gridMultipleTracks gap"> | 152 <div class="grid gridMultipleTracks gap"> |
| 152 <div class="item" style="grid-column: c / -1;" data-offset-x="40" data-offs et-y="0" data-expected-width="160" data-expected-height="25"></div> | 153 <div class="item" style="grid-column: c / -1;" data-offset-x="40" data-offs et-y="0" data-expected-width="160" data-expected-height="25"></div> |
| 153 </div> | 154 </div> |
| 154 | 155 |
| 156 <div class="grid gridMinMaxFixedFlex gap"> | |
| 157 <div class="item" style="grid-column-start: 1" data-offset-x="0" data-offset -y="0" data-expected-width="200" data-expected-height="25"></div> | |
|
Manuel Rego
2016/09/12 19:50:17
Super nit, but you could simply use "grid-column"
| |
| 158 </div> | |
| 159 | |
| 160 <div class="grid gridMinMaxFixedFlex gap"> | |
| 161 <div class="item" style="grid-column-start: 1" data-offset-x="0" data-offset -y="0" data-expected-width="90" data-expected-height="25"></div> | |
| 162 <div class="item" style="grid-column-start: 2" data-offset-x="110" data-offs et-y="0" data-expected-width="90" data-expected-height="25"></div> | |
| 163 </div> | |
| 164 | |
| 155 </body> | 165 </body> |
| OLD | NEW |