grid-fragmentation-013.html (1432B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html lang="en-US" class="reftest-paged"><head> 7 <meta charset="utf-8"> 8 <title>CSS Grid Test: Fragmentation in print context of height:auto grid, item break-inside:avoid</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-013-ref.html"> 12 <style type="text/css"> 13 @page { size:5in 3in; margin:0.5in; } 14 html,body { 15 color:black; background-color:white; font-size:16px; padding:0; margin:0; 16 } 17 18 .grid { 19 display: grid; 20 grid-template-columns: 0.6in 0.6in 0.6in; 21 grid-auto-rows: 1in; 22 grid-gap: 0.1in; 23 border: 0.1in solid; 24 align-items: start; 25 } 26 span { display:block; background:lime; border:0.05in solid black; } 27 x { display:block; height:0.2in; } 28 .avoid-break { page-break-inside:avoid; break-inside:avoid; } 29 30 </style> 31 </head> 32 <body> 33 34 <div style="padding-top:1in; background:grey"> 35 <div class="grid"> 36 <span class="avoid-break"><x></x><x></x><x></x><x></x><x></x></span> 37 </div></div> 38 39 <div style="padding-top:1in; background:grey"> 40 <div class="grid" style="align-content:end; grid-auto-rows:auto; height:1in"> 41 <span xclass="avoid-break"><x></x><x></x><x></x><x></x><x></x></span> 42 </div></div> 43 44 </body> 45 </html>