single-line-column-flex-fragmentation-060-print.html (1139B)
1 <!DOCTYPE html> 2 <html> 3 <meta charset="utf-8"> 4 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> 5 <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> 6 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination"> 7 <link rel="match" href="single-line-column-flex-fragmentation-060-print-ref.html"> 8 9 <style> 10 @page { size: 5in 3in; margin: 0.5in; } 11 12 :root { 13 print-color-adjust: exact; 14 } 15 16 body { margin: 0; } 17 18 .flexbox { 19 display: flex; 20 flex-direction: column; 21 border: 0.25in solid black; 22 font-size: 0.25in; 23 row-gap: 0.25in; 24 } 25 .item { 26 contain: size; 27 box-sizing: border-box; 28 border: 4px solid purple; 29 height: 0.5in; 30 } 31 </style> 32 33 <!-- This div makes the flexbox not at the top of first page. --> 34 <div style="height: 0.25in; background: gray;"></div> 35 36 <div class="flexbox"> 37 <div class="item">1</div> 38 <div class="item">2</div> 39 <div class="item" style="margin-top: 0.25in">3</div> 40 <div class="item">4</div> 41 <div class="item">5</div> 42 </div> 43 44 <div style="height: 0.25in; background: gray;"></div> 45 </html>