-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathborder-shape-ignore-radius-computed.html
More file actions
27 lines (27 loc) · 1.2 KB
/
border-shape-ignore-radius-computed.html
File metadata and controls
27 lines (27 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<title>CSS Border Shape: border-radius is ignored in computed style when border-shape is specified</title>
<link rel="help" href="https://drafts.csswg.org/css-borders-4/#border-shape-radius-interaction">
<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>