monolithic-overflow-print-ref.html (985B)
1 <!DOCTYPE html> 2 <link rel="author" title="Psychpsyo" href="mailto:psychpsyo@gmail.com" /> 3 <style> 4 :root { 5 print-color-adjust: exact; 6 } 7 </style> 8 <p style="height: 50vh">Test passes if there is two purple rectangles at the start of both page 2 and 3 when printing the page (Ctrl+P, with "print backgrounds" enabled).</p> 9 <div style="display:grid; grid-template-columns:1fr 1fr; break-before:page;"> 10 <div style="contain:size; height:75vh;"> 11 <div style="height:75vh; width: 100px; background:purple;"></div> 12 </div> 13 <div style="contain:size; height:75vh;"> 14 <div style="height:75vh; width: 100px; background:purple;"></div> 15 </div> 16 </div> 17 <div style="display:grid; grid-template-columns:1fr 1fr; break-before:page;"> 18 <div style="contain:size; height:75vh;"> 19 <div style="height:75vh; width: 100px; background:purple;"></div> 20 </div> 21 <div style="contain:size; height:75vh;"> 22 <div style="height:75vh; width: 100px; background:purple;"></div> 23 </div> 24 </div>