blob: 36d158b4d08ff93d40f5e8e1ed0c772d5b3bd395 (
plain)
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
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS basic box model: parsing padding with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-box-3/#propdef-padding">
<meta name="assert" content="padding supports the full grammar '<length-percentage>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("padding", "10px");
test_valid_value("padding", "10px 20px 30px 40px");
test_valid_value("padding", "calc(2em + 3ex)");
test_valid_value("padding-top", "10px");
test_valid_value("padding-right", "20px");
test_valid_value("padding-bottom", "30px");
test_valid_value("padding-left", "40px");
test_valid_value("padding", "20%");
test_valid_value("padding", "10px 20% 30% 40px");
test_valid_value("padding-right", "20%");
// https://drafts.csswg.org/css-values-4/#sort-a-calculations-children
test_valid_value("padding-right", "calc(2em + 3%)", "calc(3% + 2em)");
</script>
</body>
</html>
|