Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-text-decor/parsing/text-decoration-color-computed.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Text Decoration Test: getComputedStyle().textDecorationColor</title>
<meta name="assert" content="Computed text-decoration-color is the computed color.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<style>
#container {
color: rgb(255, 0, 0);
text-decoration-color: currentcolor;
}
#target {
color: rgb(0, 255, 0);
}
</style>
</head>
<body>
<div id="container">
<div id="target"></div>
</div>
<script>
test_computed_value("text-decoration-color", "rgb(0, 0, 255)");
test_computed_value("text-decoration-color", "currentcolor", "rgb(0, 255, 0)");
test_computed_value("text-decoration-color", "inherit", "rgb(0, 255, 0)"); // currentcolor
</script>
</body>
</html>