Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-content/attr-case-sensitivity-004.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>attr() with SVG attributes</title>
<link rel="match" href="/css/css-content/attr-case-sensitivity-ref-004.html">
<meta name="assert" content="This test checks that SVG attribute names specified in the attr() function are case-sensitive.">
<style>
svg { width: 100px; height: 100px; }
#casematch { background-color: attr(testCase type(<color>), white); }
#lowercase { background-color: attr(testcase type(<color>), white); }
</style>
<svg id="casematch"></svg>
<svg id="lowercase"></svg>
<script>
document.getElementById("casematch").setAttribute("testCase", "red");
document.getElementById("lowercase").setAttribute("testCase", "green");
</script>