grid-fragmentation-017.html (3549B)
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 grid with first grid row at top-of-page and box-decoration-break:clone</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-017-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 grid-template-columns: 30px 30px 30px; 33 grid-auto-rows: 50px; 34 grid-gap: 12px; 35 border:5px solid; 36 border-top-width:0; 37 border-bottom-width:10px; 38 box-decoration-break: clone; 39 align-content: start; 40 } 41 span { background:lime; border:1px solid black; } 42 x { display:block; height:20px; } 43 44 </style> 45 </head> 46 <body> 47 48 <div class="columns" style="height: 120px/*fragmentainer ends in the end border*/"> 49 <div style="background:grey"> 50 <div class="grid"> 51 <span style="grid-row:span 2"><x></x></span> 52 <span style="height:60px; background:cyan"><x></x></span> 53 <span><x></x></span> 54 <span style="align-self:end; background:pink"><x></x></span> 55 <span style="grid-row:1"><x></x></span> 56 </div></div></div> 57 58 <div class="columns" style="height: 8px/*fragmentainer ends in the end border*/"> 59 <div style="background:grey"> 60 <div class="grid"> 61 </div></div></div> 62 63 <div class="columns" style="height: 10px/*fragmentainer ends in the end border*/"> 64 <div style="background:grey"> 65 <div class="grid" style="height:2px/*creates a Class C break opportunity at the end*/"> 66 </div></div></div> 67 68 <div class="columns" style="height: 90px/*fragmentainer ends in the last row*/"> 69 <div style="background:grey"> 70 <div class="grid"> 71 <span style="grid-row:span 2"><x></x></span> 72 <span style="height:60px; background:cyan"><x></x></span> 73 <span style="align-self:end; background:pink"><x></x></span> 74 <span style="grid-row:1; height:60px"><x></x></span> 75 </div></div></div> 76 77 <div class="columns" style="height: 60px/*fragmentainer ends in the grid gap between the rows */"> 78 <div style="background:grey"> 79 <div class="grid"> 80 <span style="grid-row:span 2"><x></x></span> 81 <span style="height:60px; background:cyan"><x></x></span> 82 <span style="align-self:end; background:pink"><x></x></span> 83 <span style="grid-row:1; height:60px"><x></x></span> 84 </div></div></div> 85 86 <div class="columns" style="height: 30px/*fragmentainer ends in the first row*/; margin-bottom:30px"> 87 <div style="background:grey"> 88 <div class="grid"> 89 <span style="grid-row:span 2"><x></x></span> 90 <span style="height:60px; background:cyan"><x></x></span> 91 <span style="align-self:end; background:pink"><x></x></span> 92 <span style="grid-row:1; height:60px"><x></x></span> 93 </div></div></div> 94 95 <div class="columns" style="height: 0px/*zero height fragmentainer*/; margin-bottom:60px"> 96 <div style="background:grey"> 97 <div class="grid"> 98 <span style="grid-row:span 2"><x></x></span> 99 <span style="height:60px; background:cyan"><x></x></span> 100 <span style="align-self:end; background:pink"><x></x></span> 101 <span style="grid-row:1; height:60px"><x></x></span> 102 </div></div></div> 103 104 </body> 105 </html>