summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/animations/interpolation/border-image-outset-interpolation.html
blob: 40e0a73520dd4145278a94141fff24965aebba4d (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
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.parent {
  border-image-outset: 10px;
}
.target {
  width: 50px;
  height: 50px;
  background-color: black;
  display: inline-block;
  border: 25px;
  margin-right: 50px;
  border-image-slice: 30%;
  background-clip: content-box;
  border-image-source: linear-gradient(45deg, pink, blue, white, black, green);
  border-image-outset: 1px;
}
.expected {
  background-color: green;
}
</style>
<body>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
  property: 'border-image-outset',
  from: '',
  to: '2px',
}, [
  {at: -0.3, is: '0.7px'},
  {at: 0, is: '1px'},
  {at: 0.3, is: '1.3px'},
  {at: 0.6, is: '1.6px'},
  {at: 1, is: '2px'},
  {at: 1.5, is: '2.5px'},
]);

assertInterpolation({
  property: 'border-image-outset',
  from: 'initial',
  to: '2px',
}, [
  {at: -0.3, is: '0px'}, // Non-negative
  {at: 0, is: '0px'},
  {at: 0.3, is: '0.6px'},
  {at: 0.6, is: '1.2px'},
  {at: 1, is: '2px'},
  {at: 1.5, is: '3px'},
]);

assertInterpolation({
  property: 'border-image-outset',
  from: 'inherit',
  to: '2px',
}, [
  {at: -0.3, is: '12.4px'},
  {at: 0, is: '10px'},
  {at: 0.3, is: '7.6px'},
  {at: 0.6, is: '5.2px'},
  {at: 1, is: '2px'},
  {at: 1.5, is: '0px'},
]);

assertInterpolation({
  property: 'border-image-outset',
  from: 'unset',
  to: '2px',
}, [
  {at: -0.3, is: '0px'}, // Non-negative
  {at: 0, is: '0px'},
  {at: 0.3, is: '0.6px'},
  {at: 0.6, is: '1.2px'},
  {at: 1, is: '2px'},
  {at: 1.5, is: '3px'},
]);

assertInterpolation({
  property: 'border-image-outset',
  from: '0px',
  to: '5px',
}, [
  {at: -0.3, is: '0px'}, // Non-negative
  {at: 0, is: '0px'},
  {at: 0.3, is: '1.5px'},
  {at: 0.6, is: '3px'},
  {at: 1, is: '5px'},
  {at: 1.5, is: '7.5px'},
]);

assertInterpolation({
  property: 'border-image-outset',
  from: '0',
  to: '1',
}, [
  {at: -0.3, is: '0'}, // Non-negative
  {at: 0, is: '0'},
  {at: 0.3, is: '0.3'},
  {at: 0.6, is: '0.6'},
  {at: 1, is: '1'},
  {at: 1.5, is: '1.5'},
]);
</script>
</body>