dimensions-015-print.tentative.html (1086B)
1 <!DOCTYPE html> 2 <title>Viewport units in page and page margin contexts 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="dimensions-015-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: 2in; 14 15 @top-left { 16 width: 20vw; /* 1in */ 17 height: 50vh; /* 1.5in */ 18 margin-bottom: 10vw; /* 0.5in; */ 19 margin-left: 10px; 20 background: cyan; 21 content: ""; 22 } 23 } 24 :root { 25 print-color-adjust: exact; 26 } 27 body { 28 margin: 0; 29 background: yellow; 30 } 31 </style> 32 <div style="margin:10px; width:1in; height:1.5in; background:cyan;"></div> 33 34 The page area size should be 7.5 by 6 inches. There should be two identical 35 cyan boxes above.