negation-001.html (1169B)
1 <!doctype html> 2 <html> 3 <head> 4 <title>Test: support for negated conditions in Media Queries</title> 5 <link rel="author" title="Romain Menke" href="https://github.com/romainmenke"> 6 <link rel="help" href="https://www.w3.org/TR/mediaqueries-4/#media-conditions"> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 8 <meta name="assert" content="Test passes if negated conditions are correctly evaluated."> 9 <style> 10 div { 11 background-color: red; 12 height: 20px; 13 width: 100px; 14 } 15 @media not print { 16 .test1 { background: green; } 17 } 18 @media not (monochrome) { 19 .test2 { background: green; } 20 } 21 @media (not (monochrome)) { 22 .test3 { background: green; } 23 } 24 @media not (not (color)) { 25 .test4 { background: green; } 26 } 27 .test5 { background: green; } 28 @media not ((unknown) or (monochrome)) { 29 .test5 { background: red; } 30 } 31 </style> 32 </head> 33 <body> 34 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 35 <div class="test1"></div> 36 <div class="test2"></div> 37 <div class="test3"></div> 38 <div class="test4"></div> 39 <div class="test5"></div> 40 </body> 41 </html>