-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathxywh-function-computed.html
More file actions
25 lines (24 loc) · 1.52 KB
/
xywh-function-computed.html
File metadata and controls
25 lines (24 loc) · 1.52 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Shapes Module Level 1: the computed value of the xywh() function</title>
<link rel="help" href="https://un5n798jx6qx6j0rmf2verhh.julianrbryant.com/css-shapes-1/#funcdef-basic-shape-xywh">
<meta name="assert" content="Tests parsing of the xywh() function">
<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>
<script>
test_computed_value("shape-outside", "xywh(0px 1px 2% 3em)", "inset(1px 98% calc(100% - 49px) 0px)");
test_computed_value("shape-outside", "xywh(0px calc(100% - 20px) 2% 3em)", "inset(calc(100% - 20px) 98% calc(0% - 28px) 0px)");
test_computed_value("shape-outside", "xywh(10px 20px 30px 25px round 100%)", "inset(20px calc(100% - 40px) calc(100% - 45px) 10px round 100%)");
test_computed_value("shape-outside", "xywh(10px 20px 30px 25px round 0 1px)", "inset(20px calc(100% - 40px) calc(100% - 45px) 10px round 0px 1px)");
test_computed_value("shape-outside", "xywh(10px 20px 30px 25px round 0px 1px 2%)", "inset(20px calc(100% - 40px) calc(100% - 45px) 10px round 0px 1px 2%)");
test_computed_value("shape-outside", "xywh(10px 20px 30px 25px round 0px 1px 2% 3em)", "inset(20px calc(100% - 40px) calc(100% - 45px) 10px round 0px 1px 2% 48px)");
test_computed_value("shape-outside", "xywh(10px 20px 30px 25px round 20% / 0px 1px 2% 3em)", "inset(20px calc(100% - 40px) calc(100% - 45px) 10px round 20% / 0px 1px 2% 48px)");
</script>
</body>
</html>