Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <link href="resources/grid.css" rel="stylesheet"> | |
| 3 <style> | |
| 4 .column { grid-auto-flow: column; } | |
| 5 .inline-block { display: inline-block; } | |
| 6 .grid, .inline-grid { background-color: lightgrey; } | |
| 7 .border { border: 11px solid pink; } | |
| 8 .padding { padding: 13px; } | |
| 9 .margin { margin: 8px 0; } | |
| 10 .grid > div { | |
| 11 min-width: 0; | |
| 12 min-height: 0; | |
|
Manuel Rego
2016/10/25 19:42:08
Just out of curiosity, why do you need this?
jfernandez
2016/10/26 14:22:31
It's just legacy, with the purpose of dealing with
| |
| 13 } | |
| 14 </style> | |
| 15 <p>This test ensures that Baseline Alignment works for 1-dimensional Grid like i n Flexible Box, even using margins, paddings and borders.</p> | |
| 16 <div> | |
| 17 before text | |
| 18 <div class="border" style="display: inline-block; background-color: lightgrey"> | |
| 19 <div class="grid" style="height: 30px; margin-top: 7px; padding-top: 10px;"> | |
| 20 baseline | |
| 21 </div> | |
| 22 </div> | |
| 23 after text | |
| 24 </div> | |
| 25 | |
| 26 <div> | |
| 27 Should align | |
| 28 <div class="inline-block border"> | |
| 29 <div class="grid column padding" style="grid-template-columns: 50px; grid-temp late-rows: 50px; background-color: pink"> | |
| 30 <div style="background-color: lightgrey"></div> | |
| 31 </div> | |
| 32 </div> | |
| 33 with the | |
| 34 <div class="inline-block margin"> | |
| 35 <div class="grid column border" style="grid-template-columns: 50px; grid-templ ate-rows: 50px; background-color: pink"> | |
| 36 <div style="background-color: lightgrey"></div> | |
| 37 </div> | |
| 38 </div> | |
| 39 bottom of | |
| 40 <div class="inline-block padding" style="padding-left: 0; padding-right: 0"> | |
| 41 <div class="grid column margin border" style="grid-template-columns: 50px; gri d-template-rows: 50px; background-color: pink"> | |
| 42 <div style="background-color: lightgrey;"></div> | |
| 43 </div> | |
| 44 </div> | |
| 45 the grey | |
| 46 <div class="inline-grid column margin border" style="grid-template-columns: 30px ; grid-template-rows: 30px;"></div> | |
| 47 box. | |
| 48 </div> | |
| 49 | |
| 50 <div> | |
| 51 Should align | |
| 52 with the | |
| 53 <div class="inline-block"> | |
| 54 <div class="grid column" style="background-color: pink"> | |
| 55 <div class="border padding margin" style="background-color: lightgrey;"></ div> | |
| 56 </div> | |
| 57 </div> | |
| 58 middle of | |
| 59 <div class="inline-grid column margin border padding"></div> | |
| 60 the grey box. | |
| 61 </div> | |
| 62 | |
| 63 <div> | |
| 64 Should align with the top | |
| 65 <div class="inline-block border margin padding" style="background-color: pink"> | |
| 66 <div class="grid column border margin padding" style="grid-template-columns: 5 0px; grid-template-rows: 50px; background-color: pink"> | |
| 67 <div style="overflow: scroll; background-color: lightgrey; margin-top: 4px ; border-top: 9px solid pink;"></div> | |
| 68 </div> | |
| 69 </div> | |
| 70 of the horizontal scrollbar. | |
| 71 </div> | |
| 72 | |
| 73 <div> | |
| 74 Should align 10px above the | |
| 75 <div class="inline-block" style="background-color: pink"> | |
| 76 <div class="grid column" style="grid-template-columns: 50px; grid-template-row s: 50px; background-color: pink"> | |
| 77 <div style="overflow: scroll; padding-bottom: 10px; background-color: ligh tgrey;"></div> | |
| 78 </div> | |
| 79 </div> | |
| 80 horizontal scrollbar, if one is visible. | |
| 81 </div> | |
| OLD | NEW |