mq-calc-007.html (616B)
1 <!DOCTYPE html> 2 <title>Test: evaluation of mixed-unit calc in Media Queries</title> 3 <link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-func"> 4 <link rel="help" href="https://drafts.csswg.org/mediaqueries-4/#units"> 5 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 6 <style> 7 :root { font-size: 30000px; } 8 p { font-size: 16px; } 9 div { 10 width: 100px; 11 height: 100px; 12 background-color: red; 13 } 14 @media (min-width: calc(1px + 1rem)) { 15 div { background-color: green; } 16 } 17 </style> 18 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 19 <div> 20 </div>