at-supports-whitespace.html (1106B)
1 <!DOCTYPE html> 2 <title>Parsing of @supports with whitespace</title> 3 <link rel="help" href="https://drafts.csswg.org/css-conditional-3/#at-supports"> 4 <script src=/resources/testharness.js></script> 5 <script src=/resources/testharnessreport.js></script> 6 <main id=main></main> 7 <script> 8 let examples = [ 9 '@supports ((a)) {}', 10 '@supports ((a) ) {}', 11 '@supports ( (a)) {}', 12 '@supports ( (a) ) {}', 13 14 '@supports (not (a)) {}', 15 '@supports (not (a) ) {}', 16 '@supports ( not (a)) {}', 17 '@supports ( not (a) ) {}', 18 19 '@supports ((a) and (b)) {}', 20 '@supports ((a) and (b) ) {}', 21 '@supports ( (a) and (b)) {}', 22 '@supports ( (a) and (b) ) {}', 23 24 '@supports ((a) or (b)) {}', 25 '@supports ((a) or (b) ) {}', 26 '@supports ( (a) or (b)) {}', 27 '@supports ( (a) or (b) ) {}', 28 ]; 29 30 for (let example of examples) { 31 test((t) => { 32 let style = document.createElement('style'); 33 t.add_cleanup(() => style.remove()); 34 style.textContent = example; 35 main.append(style); 36 assert_equals(style.sheet.rules.length, 1); 37 }, example); 38 } 39 </script>