auto-margins-002-print.html (2483B)
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/#margin-dimension"> 4 <meta name="assert" content="Auto margins should never resolve to something negative, but be clamped to 0."> 5 <link rel="match" href="auto-margins-002-print-ref.html"> 6 <style> 7 @page { 8 margin: 100px; 9 size: 500px 440px; 10 border: solid; 11 background: red; 12 @top-left-corner { 13 border: solid; 14 margin: auto; 15 content: ""; 16 background: green; 17 } 18 @top-left { 19 border: solid; 20 margin: auto; 21 content: ""; 22 background: green; 23 } 24 @top-center { 25 border: solid; 26 margin: auto; 27 content: ""; 28 background: green; 29 } 30 @top-right { 31 border: solid; 32 margin: auto; 33 content: ""; 34 background: green; 35 } 36 @top-right-corner { 37 border: solid; 38 margin: auto; 39 content: ""; 40 background: green; 41 } 42 @right-top { 43 border: solid; 44 margin: auto; 45 content: ""; 46 background: green; 47 } 48 @right-middle { 49 border: solid; 50 margin: auto; 51 content: ""; 52 background: green; 53 } 54 @right-bottom { 55 border: solid; 56 margin: auto; 57 content: ""; 58 background: green; 59 } 60 @bottom-right-corner { 61 border: solid; 62 margin: auto; 63 content: ""; 64 background: green; 65 } 66 @bottom-right { 67 border: solid; 68 margin: auto; 69 content: ""; 70 background: green; 71 } 72 @bottom-center { 73 border: solid; 74 margin: auto; 75 content: ""; 76 background: green; 77 } 78 @bottom-left { 79 border: solid; 80 margin: auto; 81 content: ""; 82 background: green; 83 } 84 @bottom-left-corner { 85 border: solid; 86 margin: auto; 87 content: ""; 88 background: green; 89 } 90 @left-bottom { 91 border: solid; 92 margin: auto; 93 content: ""; 94 background: green; 95 } 96 @left-middle { 97 border: solid; 98 margin: auto; 99 content: ""; 100 background: green; 101 } 102 @left-top { 103 border: solid; 104 margin: auto; 105 content: ""; 106 background: green; 107 } 108 } 109 :root { 110 print-color-adjust: exact; 111 } 112 body { 113 background: white; 114 } 115 </style> 116 There should be 16 margin boxes around this page area. They should take up all 117 available space, and there should be no red, only green rectangles with a black 118 border.