grid-fragmentation-002.html (3460B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html><head> 7 <meta charset="utf-8"> 8 <title>CSS Grid Test: Fragmentation height:auto two row grid without grid items</title> 9 <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1144096"> 10 <link rel="help" href="https://drafts.csswg.org/css-grid/#pagination"> 11 <link rel="match" href="grid-fragmentation-002-ref.html"> 12 <style type="text/css"> 13 html,body { 14 color:black; background-color:white; font-size:16px; padding:0; margin:0; 15 } 16 body { overflow:hidden; } 17 18 .columns { 19 position:relative; 20 -ms-columns: 5; 21 -webkit-columns: 5; 22 columns: 5; 23 -ms-column-fill: auto; 24 -webkit-column-fill: auto; 25 column-fill: auto; 26 border: 2px solid salmon; 27 margin-bottom: 5px; 28 } 29 30 .grid { 31 display: grid; 32 position:relative; 33 grid-template-columns: 30px 30px 30px; 34 grid-template-rows: 50px 50px; 35 grid-gap: 12px; 36 border:5px solid; 37 align-content: start; 38 } 39 span { position:absolute; top:0;bottom:0;right:0;left:0;background:lime; border:1px solid black; } 40 x { display:block; height:20px; } 41 42 </style> 43 </head> 44 <body> 45 46 <div class="columns" style="height: 130px/*fragmentainer ends in the end border*/"> 47 <div style="padding-top:10px; background:grey"> 48 <div class="grid"> 49 <span><x></x></span> 50 </div></div></div> 51 52 <div class="columns" style="height: 64px/*fragmentainer ends in the end border*/"> 53 <div style="padding-top:10px; background:grey"> 54 <div class="grid"> 55 <span><x></x></span> 56 </div></div></div> 57 58 <div class="columns" style="height: 18px/*fragmentainer ends in the end border*/"> 59 <div style="padding-top:10px; background:grey"> 60 <div class="grid" style="grid-template-rows:auto"> 61 <span></span> 62 </div></div></div> 63 64 <div class="columns" style="height: 20px/*fragmentainer ends in the end border*/"> 65 <div style="padding-top:10px; background:grey"> 66 <div class="grid" style="grid-template-rows:auto; height:2px/*creates a Class C break opportunity at the end*/"> 67 <span></span> 68 </div></div></div> 69 70 <div class="columns" style="height: 100px/*fragmentainer ends in the last row*/"> 71 <div style="padding-top:10px; background:grey"> 72 <div class="grid"> 73 <span><x></x></span> 74 </div></div></div> 75 76 <div class="columns" style="height: 70px/*fragmentainer ends in the grid gap between the rows */"> 77 <div style="padding-top:10px; background:grey"> 78 <div class="grid"> 79 <span><x></x></span> 80 </div></div></div> 81 82 <div class="columns" style="height: 40px/*fragmentainer ends in the first row*/; margin-bottom:30px"> 83 <div style="padding-top:10px; background:grey"> 84 <div class="grid"> 85 <span><x></x></span> 86 </div></div></div> 87 88 <!-- 89 90 TODO (bug 1347692): this caused too many intermittent failures, see bug 1317149 and bug 1264056 91 92 <div class="columns" style="height: 13px/*fragmentainer ends in the grid start border */; margin-bottom:60px"> 93 <div style="padding-top:10px; background:grey"> 94 <div class="grid"> 95 <span><x></x></span> 96 </div></div></div> 97 98 --> 99 100 101 <div class="columns" style="height: 8px/*fragmentainer ends above the grid*/; margin-bottom:60px"> 102 <div style="padding-top:10px; background:grey"> 103 <div class="grid"> 104 <span><x></x></span> 105 </div></div></div> 106 107 <div class="columns" style="height: 0px/*zero height fragmentainer*/; margin-bottom:60px"> 108 <div style="padding-top:10px; background:grey"> 109 <div class="grid"> 110 <span><x></x></span> 111 </div></div></div> 112 113 114 </body> 115 </html>