Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Gaps: rule-inset shorthands getComputedStyle()</title>
<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<script src="/css/support/inheritance-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<style>
#target {
font-size: 40px;
}
</style>
<script>
const properties = ["column-rule-edge-inset", "row-rule-edge-inset", "rule-edge-inset",
"column-rule-interior-inset", "row-rule-interior-inset", "rule-interior-inset"];
for (const property of properties) {
test_computed_value(property, "10px", "10px");
test_computed_value(property, "-20px 10px", "-20px 10px");
test_computed_value(property, "calc(10px + 0.5em)", "30px");
test_computed_value(property, "calc(10px - 0.5em)", "-10px");
test_computed_value(property, "30%", "30%");
test_computed_value(property, "calc(25% + 10px)", "calc(25% + 10px)");
test_computed_value(property, "10px 20px");
}
</script>
</body>
</html>