page-size-016-print.tentative.html (927B)
1 <!DOCTYPE html> 2 <title>Viewport units in @page context are resolved against the default page box size</title> 3 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> 4 <link rel="help" href="https://issues.chromium.org/issues/380860850"> 5 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5437"> 6 <link rel="match" href="page-size-016-print-ref.html"> 7 <style> 8 /* The default page box size in WPT is 5 by 3 inches. */ 9 @page { 10 width: 150vw; /* Page area width: 7.5in */ 11 height: 200vh; /* Page area height: 6in */ 12 margin: 0; 13 margin-top: 20vw; /* Margin-top: 1in */ 14 15 /* This has no effect, since both width and height are specified, 16 using viewport units. */ 17 size: 1234px; 18 } 19 :root { 20 print-color-adjust: exact; 21 } 22 body { 23 margin: 0; 24 background: yellow; 25 } 26 </style> 27 The page size should be 7.5 by 6 inches. The page top margin should be 1in.