at-supports-046.html (1906B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <meta charset="UTF-8"> 4 5 <title>CSS Conditional Test: Unknown Functional Notation as False in @supports</title> 6 <meta name="assert" 7 content="Test passes if unknown but grammatical functional notations are treated as false in @supports."> 8 <link rel="help" href="https://www.w3.org/TR/css3-conditional/#at-supports"> 9 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> 10 <link rel="match" href="at-supports-001-ref.html"> 11 12 <style> 13 div { 14 background: green; 15 height: 10px; 16 width: 100px; 17 } 18 19 div { 20 background: red; 21 } 22 23 @supports not unknown() { 24 .test1.bare { background: green; } 25 } 26 @supports (not (unknown())) { 27 .test1.wrapped { background: green; } 28 } 29 30 @supports not unknown(with stuff) { 31 .test2.bare { background: green; } 32 } 33 @supports (not (unknown(with stuff))) { 34 .test2.wrapped { background: green; } 35 } 36 37 @supports not unknown(!@#% { ... } more() @stuff [ ]) { 38 .test3.bare { background: green; } 39 } 40 @supports (not (unknown(!@#% { ... } more() @stuff [ ]))) { 41 .test3.wrapped { background: green; } 42 } 43 44 .test4, .test5 { background: green; } 45 46 @supports unknown() { 47 .test4.bare { background: red; } 48 } 49 @supports (unknown()) { 50 .test4.wrapped { background: red; } 51 } 52 53 @supports unknown(with stuff) { 54 .test5.bare { background: red; } 55 } 56 @supports (unknown(with stuff)) { 57 .test5.wrapped { background: red; } 58 } 59 </style> 60 61 <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> 62 63 <div class="test1 bare"></div> 64 <div class="test2 bare"></div> 65 <div class="test3 bare"></div> 66 <div class="test4 bare"></div> 67 <div class="test5 bare"></div> 68 <div class="test1 wrapped"></div> 69 <div class="test2 wrapped"></div> 70 <div class="test3 wrapped"></div> 71 <div class="test4 wrapped"></div> 72 <div class="test5 wrapped"></div>