summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-logical/inheritance.html
blob: 5546a20d6cd8aa3887735c1f9955929dedbadaab (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
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Inheritance of CSS Logical Properties and Values properties</title>
<link rel="help" href="https://www.w3.org/TR/css-logical-1/#property-index">
<meta name="assert" content="Properties do not inherit.">
<meta name="assert" content="Properties have initial values according to the spec.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/inheritance-testcommon.js"></script>
</head>
<body>
<div id="reference-container">
  <div id="reference"></div>
</div>
<div id="container">
  <div id="target"></div>
</div>
<style>
#reference-container {
  width: 300px;
}
#reference-container, #reference {
  border-style: solid; /* Avoid border-top-width computed style 0 */
  border-top-width: medium;
}

#container, #target {
  border-block-end-style: solid; /* Avoid border-block-end-width computed style 0 */
  border-block-start-style: solid;
  border-inline-end-style: solid;
  border-inline-start-style: solid;
}

#container {
  color: blue;
  width: 300px;
}
</style>
<script>
'use strict';
const blue = "rgb(0, 0, 255)";
const green = "rgb(0, 128, 0)";
const mediumWidth = getComputedStyle(reference).borderTopWidth; // e.g. 3px
const referenceWidth = getComputedStyle(reference).width; // e.g. 294px

assert_not_inherited('block-size', '0px', '10px');

assert_not_inherited('border-block-end-color', blue, green);
assert_not_inherited('border-block-end-style', 'none', 'dotted');
assert_not_inherited('border-block-end-width', mediumWidth, '10px');

assert_not_inherited('border-block-start-color', blue, green);
assert_not_inherited('border-block-start-style', 'none', 'dotted');
assert_not_inherited('border-block-start-width', mediumWidth, '10px');

assert_not_inherited('border-end-end-radius', '0px', '10px 20px');
assert_not_inherited('border-end-start-radius', '0px', '10px 20px');

assert_not_inherited('border-inline-end-color', blue, green);
assert_not_inherited('border-inline-end-style', 'none', 'dotted');
assert_not_inherited('border-inline-end-width', mediumWidth, '10px');

assert_not_inherited('border-inline-start-color', blue, green);
assert_not_inherited('border-inline-start-style', 'none', 'dotted');
assert_not_inherited('border-inline-start-width', mediumWidth, '10px');

assert_not_inherited('border-start-end-radius', '0px', '10px 20px');
assert_not_inherited('border-start-start-radius', '0px', '10px 20px');

assert_not_inherited('inline-size', referenceWidth, '10px');

assert_not_inherited('inset-block-end', 'auto', '10px');
assert_not_inherited('inset-block-start', 'auto', '10px');
assert_not_inherited('inset-inline-end', 'auto', '10px');
assert_not_inherited('inset-inline-start', 'auto', '10px');

assert_not_inherited('margin-block-end', '0px', '10px');
assert_not_inherited('margin-block-start', '0px', '10px');
assert_not_inherited('margin-inline-end', '0px', '10px');
assert_not_inherited('margin-inline-start', '0px', '10px');

assert_not_inherited('max-block-size', 'none', '10px');
assert_not_inherited('max-inline-size', 'none', '10px');
assert_not_inherited('min-block-size', '0px', '10px');
assert_not_inherited('min-inline-size', '0px', '10px');

assert_not_inherited('padding-block-end', '0px', '10px');
assert_not_inherited('padding-block-start', '0px', '10px');
assert_not_inherited('padding-inline-end', '0px', '10px');
assert_not_inherited('padding-inline-start', '0px', '10px');
</script>
</body>
</html>