Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 11 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-values/ident-function-computed.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Values: The ident() Function (computed values)</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<div id="target"></div>
<script>
// Any property that accepts <custom-ident> will do.
let prop = 'view-transition-name';
test_computed_value(prop, 'ident(myident)', 'myident');
test_computed_value(prop, 'ident("myident")', 'myident');
test_computed_value(prop, 'ident("myident" 3)', 'myident3');
test_computed_value(prop, 'ident(3 "myident")', '\\33 myident');
test_computed_value(prop, 'ident("my" "ident")', 'myident');
test_computed_value(prop, 'ident(my "ident")', 'myident');
test_computed_value(prop, 'ident("my" ident)', 'myident');
test_computed_value(prop, 'ident(my ident)', 'myident');
test_computed_value(prop, 'ident(-- myident)', '--myident');
test_computed_value(prop, 'ident(my 3 3 3 3 ident)', 'my3333ident');
// Check for support in specific properties (WIP):
let actual_ident = 'ident("myident" 42)';
let expected_ident = 'myident42';
test_computed_value('view-transition-name', actual_ident, expected_ident);
</script>