keyframes-name-invalid.html (1979B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="UTF-8"> 5 <title>CSS Animations: parsing @keyframes name with invalid values</title> 6 <link rel="author" title="yisibl(一丝)" href="https://github.com/yisibl"/> 7 <link rel="help" href="https://drafts.csswg.org/css-animations/#typedef-keyframes-name"> 8 <meta name="assert" content="@keyframes name supports the full grammar '<custom-ident> | <string>'."> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <script src="/css/support/parsing-testcommon.js"></script> 12 </head> 13 <body> 14 <div> 15 <main id="main"></main> 16 </div> 17 <script> 18 test_keyframes_name_invalid('none'); 19 20 // The CSS-wide keywords are not valid <custom-ident>s. The default keyword is reserved and is also not a valid <custom-ident>. 21 // Spec: https://drafts.csswg.org/css-values-4/#identifier-value 22 test_keyframes_name_invalid('default'); 23 test_keyframes_name_invalid('initial'); 24 test_keyframes_name_invalid('inherit'); 25 test_keyframes_name_invalid('unset'); 26 test_keyframes_name_invalid('revert'); 27 test_keyframes_name_invalid('revert-layer'); 28 29 test_keyframes_name_invalid('12'); 30 test_keyframes_name_invalid('-12'); 31 test_keyframes_name_invalid('12foo'); 32 test_keyframes_name_invalid('foo.bar'); 33 test_keyframes_name_invalid('one two'); 34 test_keyframes_name_invalid('one, two'); 35 36 test_keyframes_name_invalid('one, initial'); 37 test_keyframes_name_invalid('one, inherit'); 38 test_keyframes_name_invalid('one, unset'); 39 test_keyframes_name_invalid('default, two'); 40 test_keyframes_name_invalid('revert, three'); 41 test_keyframes_name_invalid('revert-layer, four'); 42 // TODO: https://bugs.chromium.org/p/chromium/issues/detail?id=1342609 43 // test_keyframes_name_invalid('--foo'); 44 </script> 45 </body> 46 </html>