-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Expand file tree
/
Copy pathrule-inset-start-end-bidirectional-shorthand.html
More file actions
62 lines (57 loc) · 1.99 KB
/
Copy pathrule-inset-start-end-bidirectional-shorthand.html
File metadata and controls
62 lines (57 loc) · 1.99 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Gap Decorations: rule-inset-{start/end} bidirectional shorthands</title>
<link rel="help" href="https://www.w3.org/TR/css-gaps-1/#propdef-rule-inset">
<meta name="assert"
content="rule-inset-start/end supports the full grammar '<length-percentage>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/shorthand-testcommon.js"></script>
</head>
<body>
<script>
const rule_properties = {
'rule-inset-start': ['column-rule-inset-cap-start', 'column-rule-inset-junction-start',
'row-rule-inset-cap-start', 'row-rule-inset-junction-start'],
'rule-inset-end': ['column-rule-inset-cap-end', 'column-rule-inset-junction-end',
'row-rule-inset-cap-end', 'row-rule-inset-junction-end']
};
const testCases = [
{
input: '0px',
expected: '0px',
},
{
input: '10px',
expected: '10px',
},
{
input: '50%',
expected: '50%',
},
{
input: '-20px',
expected: '-20px',
},
{
input: 'overlap-join',
expected: 'overlap-join',
},
];
for (rule_property in rule_properties) {
const test_cases = testCases;
for (const { input, expected } of test_cases) {
const [columnCapInset, columnJunctionInset, rowCapInset, rowJunctionInset] = rule_properties[rule_property];
test_shorthand_value(rule_property, input, {
[columnCapInset]: expected,
[columnJunctionInset]: expected,
[rowCapInset]: expected,
[rowJunctionInset]: expected,
});
}
}
</script>
</body>
</html>