Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-borders/border-shape/border-shape-ignore-radius-computed.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Border Shape: border-radius is ignored in computed style when border-shape is specified</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#test {
border-shape: inset(0px) inset(0px round 20px);
border-radius: 999px;
corner-shape: bevel;
}
</style>
<div id="test"></div>
<script>
test(() => {
const style = getComputedStyle(document.getElementById('test'));
assert_not_equals(style.borderShape, 'none', 'borderShape should be parsed successfully');
assert_equals(style.borderTopLeftRadius, '999px');
assert_equals(style.borderTopRightRadius, '999px');
assert_equals(style.borderBottomRightRadius, '999px');
assert_equals(style.borderBottomLeftRadius, '999px');
assert_equals(style.cornerTopLeftShape, 'bevel');
assert_equals(style.cornerTopRightShape, 'bevel');
assert_equals(style.cornerBottomRightShape, 'bevel');
assert_equals(style.cornerBottomLeftShape, 'bevel');
}, "border-radius and corner-shape are NOT reset in computed style when border-shape is specified");
</script>