Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 28 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-gaps/parsing/gap-decorations-color-computed.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Gap Decoration: column-rule-color getComputedStyle()</title>
<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com">
<meta name="assert" content="*-rule-color computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<style>
#target {
color: lime;
}
</style>
<script>
const properties = ["column-rule-color", "row-rule-color", "rule-color"];
for (let property of properties) {
test_computed_value(property, "currentcolor", "rgb(0, 255, 0)");
test_computed_value(property, "red", "rgb(255, 0, 0)");
test_computed_value(property, "repeat(4, yellow)", "repeat(4, rgb(255, 255, 0))");
test_computed_value(property, "red green blue", "rgb(255, 0, 0) rgb(0, 128, 0) rgb(0, 0, 255)");
test_computed_value(property, "repeat(7, lime) repeat(3, red)", "repeat(7, rgb(0, 255, 0)) repeat(3, rgb(255, 0, 0))");
test_computed_value(property, "repeat(auto, red)", "repeat(auto, rgb(255, 0, 0))");
test_computed_value(property, "repeat(calc(5 + 3), salmon)", "repeat(8, rgb(250, 128, 114))");
test_computed_value(property, "color-mix(in srgb, red 50%, blue 50%)", "color(srgb 0.5 0 0.5)");
test_computed_value(property, "color-mix(in srgb, lime 25%, yellow 75%)", "color(srgb 0.75 1 0)");
test_computed_value(property, "repeat(auto, rgb(from lime r g b))", "repeat(auto, color(srgb 0 1 0))");
test_computed_value(property, "rgb(from yellow calc(255 - r) calc(255 - g) calc(255 - b))", "color(srgb 0 0 1)");
}
</script>
</body>
</html>