page-margin-006-print.html (731B)
1 <!DOCTYPE html> 2 <title>Percentage-based @page margins should resolve against the correct dimension</title> 3 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> 4 <link rel="help" href="https://www.w3.org/TR/css-page-3/#page-properties"> 5 <link rel="match" href="page-margin-006-print-ref.html"> 6 <style> 7 @page { 8 size: 6in; 9 margin: 13px; 10 margin: inherit; 11 } 12 :root { 13 print-color-adjust: exact; 14 background: yellow; 15 margin: 0.5in; 16 } 17 body { 18 margin: 0; 19 background: cyan; 20 } 21 </style> 22 There should be a half-inch page margin on every side. The cyan box should be 23 inset by yet another half-inch, except at the bottom. 24 <div style="break-before:page;"> 25 Second page. 26 </div>