mq-calc-sign-function-003.html (753B)
1 <!doctype html> 2 <title>Test: support for calc with sign() in Media Queries</title> 3 <link rel="author" title="Daniil Sakhapov" href="mailto:sakhapov@chromium.org"> 4 <link rel="help" href="http://www.w3.org/TR/css3-values/#calc-notation"> 5 <link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#units"> 6 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 7 <style> 8 :root { 9 font-size: 16px; 10 } 11 12 div { 13 width: 100px; 14 height: 100px; 15 background-color: red; 16 } 17 18 @media screen and (aspect-ratio > calc(sign(17px - 1rem) * 59) / calc(79 * sign(17px - 1rem))) { 19 div { 20 background-color: green; 21 } 22 } 23 </style> 24 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 25 <div></div>