Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 13 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-values/ident-function-parsing.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Values: The ident() Function (parsing)</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script>
// Any property that accepts <custom-ident> will do.
let prop = 'view-transition-name';
test_invalid_value(prop, 'ident()');
test_invalid_value(prop, 'ident( )');
test_invalid_value(prop, 'ident(rgb(1, 2, 3))');
test_invalid_value(prop, 'ident(5px)');
test_valid_value(prop, 'ident(myident)');
test_valid_value(prop, 'ident( myident)', 'ident(myident)');
test_valid_value(prop, 'ident(myident )', 'ident(myident)');
test_valid_value(prop, 'ident("myident")');
test_valid_value(prop, 'ident("myident" 3)');
test_valid_value(prop, 'ident(3 "myident")');
test_valid_value(prop, 'ident("my" "ident")');
test_valid_value(prop, 'ident(my "ident")');
test_valid_value(prop, 'ident("my" ident)');
test_valid_value(prop, 'ident(my ident)');
test_valid_value(prop, 'ident(-- myident)');
test_valid_value(prop, 'ident(my 3 3 3 3 ident)')
// Check for support in specific properties (WIP):
let ident = 'ident("myident" 42)';
test_valid_value('view-transition-name', ident);
</script>