at-media-001.html (1083B)
1 <!doctype html> 2 <head> 3 <title>CSS Test (Conditional Rules): Support for simple passing conditions in @media</title> 4 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> 5 <link rel="help" href="https://www.w3.org/TR/css-conditional-3/#use"> 6 <link rel="help" href="https://www.w3.org/TR/css-conditional-3/#at-media"> 7 <link rel="match" href="at-supports-001-ref.html"> 8 <meta name="assert" 9 content="Test passes if rules under a true @media condition are applied in place."> 10 <style> 11 div { 12 background: red; 13 height: 25px; 14 width: 100px; 15 } 16 17 @media all { 18 .test1 { background: green; } 19 .test2 { background: red; } 20 } 21 .test2 { background: green; } 22 23 @media not unknown { 24 .test3 { background: green; } 25 .test4 { background: red; } 26 } 27 .test4 { background: green; } 28 </style> 29 </head> 30 <body> 31 <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> 32 <div class="test1"></div> 33 <div class="test2"></div> 34 <div class="test3"></div> 35 <div class="test4"></div> 36 </body> 37 </html>