Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-env/env-fallback-braces.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Environment Variables: {}-wrapped env() fallback</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<div id="target"></div>
<script>
test_computed_value('color', 'env(missing-name, {rgb(1, 2, 3)})', 'rgb(1, 2, 3)');
test_computed_value('color', 'env(missing-name, { rgb(1, 2, 3) })', 'rgb(1, 2, 3)');
test_computed_value('color', 'env(missing-name, {rgb(1, 2, 3)} )', 'rgb(1, 2, 3)');
test_computed_value('font-family', 'env(missing-name, {Arial, sans-serif})', 'Arial, sans-serif');
test_invalid_value('color', 'env(missing-name, {rgb(1, 2, 3)} rgb(4, 5, 6))');
test_invalid_value('font-family', 'env(missing-name, {Arial}, sans-serif)');
</script>