calc-min-width-block-1

min-width: calc() on blocks

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3   <title>CSS Test: min-width: calc() on blocks</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-width-block-1-ref.htm" rel="match">
 7   <meta content="" name="flags">
 8 <style type="text/css">
 9 
10 body { width: 500px }
11 p { background: green; color: white; margin: 1px 0; font-size: 10px; width: 0 }
12 
13 </style>
14 </head>
15 <body>
16 
17 <p style="min-width: calc(50% - 3px)">50% - 3px</p>
18 <p style="min-width: calc(25% - 3px + 25%)">25% - 3px + 25%</p>
19 <p style="min-width: calc(25% - 3px + 12.5% * 2)">25% - 3px + 12.5% * 2</p>
20 <p style="min-width: calc(25% - 3px + 12.5%*2)">25% - 3px + 12.5%*2</p>
21 <p style="min-width: calc(25% - 3px + 2*12.5%)">25% - 3px + 2*12.5%</p>
22 <p style="min-width: calc(25% - 3px + 2 * 12.5%)">25% - 3px + 2 * 12.5%</p>
23 <p style="min-width: calc(30% + 20%)">30% + 20%</p>
24 
25 
26 </body></html>