import-conditional-001.html (1168B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Cascade: @import with basic media query</title> 6 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> 7 <link rel="help" href="https://www.w3.org/TR/css-cascade-3/#conditional-import"> 8 <link rel="help" href="https://www.w3.org/TR/css-cascade-4/#conditional-import"> 9 <link rel="help" href="https://www.w3.org/TR/css3-mediaqueries/#syntax"> 10 <link rel="match" href="reference/ref-filled-green-100px-square.xht"> 11 <meta name="assert" content="Test passes on visual UAs if @import can be combined with a media query."> 12 <style> 13 @import "support/test-red.css"; 14 @import "support/test-green.css" 15 (min-width: 1px) and /* assuming screen < 1km */ (max-width: 40000in), nonsense; 16 @import "support/test-red.css" 17 (max-width: 1px), nonsense; 18 div { 19 box-sizing: border-box; 20 width: 100px; 21 height: 100px; 22 padding: 5px; /* Avoids text antialiasing issues */ 23 background: red; 24 } 25 </style> 26 </head> 27 <body> 28 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 29 30 <div class="test">FAIL</div> 31 </body> 32 </html>