page-box-007-print.html (768B)
1 <!DOCTYPE html> 2 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> 3 <link rel="help" href="https://drafts.csswg.org/css-page-3/#page-properties"> 4 <link rel="match" href="page-box-007-print-ref.html"> 5 <meta name="assert" content="Test percentage-based @page padding"> 6 <style> 7 @page { 8 size: 400px 800px; 9 margin: 0; 10 padding: 5% 20% 15% 40%; 11 background: red; 12 } 13 :root { 14 print-color-adjust: exact; 15 } 16 body { 17 margin: 0; 18 background: hotpink; 19 } 20 </style> 21 <div style="box-sizing:border-box; padding:4px; height:100vh; background:yellow;"> 22 The page padding (in hotpink) should be smallest at the top, larger at the 23 right, even larger at the bottom, and largest at the left. There should be no 24 red. 25 </div>