cdc-vs-ident-tokens.html (662B)
1 <!doctype html> 2 <title>CDC versus Ident Token</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <style> 6 7 --> 8 9 --foo { color: blue; } 10 11 </style> 12 13 <meta name=author content="Tab Atkins-Bittner"> 14 <link rel=help href="https://drafts.csswg.org/css-syntax/#consume-token"> 15 16 <!-- 17 The ordering of the checks in the HYPHEN-MINUS step is important; 18 if you get it wrong, ident-token can swallow cdc-token. 19 --> 20 21 <script> 22 23 test(()=>{ 24 const rule = document.styleSheets[0].cssRules[0]; 25 assert_equals(rule.selectorText, "--foo"); 26 }, "CDC-token is properly emitted, and not parsed as an ident."); 27 28 </script>