calc-margin-block-1

Test of margin-*: calc()

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3   <title>CSS Test: Test of margin-*: calc()</title>
 4   <link href="https://dbaron.org/" rel="author" title="L. David Baron">
 5   <link href="http://www.w3.org/TR/css3-values/#calc-notation" rel="help">
 6   <link href="reference/calc-margin-block-1-ref.htm" rel="match">
 7   <meta content="" name="flags">
 8 <style type="text/css">
 9 
10 div { border: medium solid green; width: 500px }
11 p { background: yellow }
12 
13 </style>
14 </head>
15 <body>
16 
17 <div><p style="margin: calc(10px + 1%) 0 0 0">paragraph with margin</p></div>
18 <div><p style="margin: 0 calc(10px + 1%) 0 0">paragraph with margin</p></div>
19 <div><p style="margin: 0 0 calc(10px + 1%) 0">paragraph with margin</p></div>
20 <div><p style="margin: 0 0 0 calc(10px + 1%)">paragraph with margin</p></div>
21 <div><p style="margin: calc(30px - 1%)">paragraph with margin</p></div>
22 
23 
24 </body></html>