calc-padding-block-1

Test of padding-*: 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 padding-*: 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-padding-block-1-ref.htm" rel="match">
 7   <meta content="" name="flags">
 8 <style type="text/css">
 9 
10 body { width: 500px }
11 div { border: medium solid green }
12 p { background: yellow; margin: 0 }
13 
14 </style>
15 </head>
16 <body>
17 
18 <div style="padding: calc(10px + 1%) 0 0 0"><p>paragraph with padding</p></div>
19 <div style="padding: 0 calc(10px + 1%) 0 0"><p>paragraph with padding</p></div>
20 <div style="padding: 0 0 calc(10px + 1%) 0"><p>paragraph with padding</p></div>
21 <div style="padding: 0 0 0 calc(10px + 1%)"><p>paragraph with padding</p></div>
22 <div style="padding: calc(30px - 1%)"><p>paragraph with padding</p></div>
23 
24 
25 </body></html>