5 border-image-width:
100px;
10 background-color: black;
11 display: inline-block;
13 border-image-source: linear-gradient(
45deg, red, blue, green);
14 border-image-width:
10px;
17 background-color: green;
22 <script src=
"resources/interpolation-test.js"></script>
25 property
: 'border-image-width',
29 {at
: -0.3, is
: '7px'},
31 {at
: 0.3, is
: '13px'},
32 {at
: 0.6, is
: '16px'},
34 {at
: 1.5, is
: '25px'},
36 {at
: 10, is
: '110px'},
39 property
: 'border-image-width',
46 {at
: 0.6, is
: '20px'},
48 {at
: 1.5, is
: '20px'},
53 property
: 'border-image-width',
57 {at
: -0.3, is
: '124px'},
59 {at
: 0.3, is
: '76px'},
60 {at
: 0.6, is
: '52px'},
67 property
: 'border-image-width',
74 {at
: 0.6, is
: '20px'},
76 {at
: 1.5, is
: '20px'},
81 property
: 'border-image-width',
85 {at
: -0.3, is
: '0px'}, // CSS border-image-width can't be negative.
88 {at
: 0.6, is
: '12px'},
90 {at
: 1.5, is
: '30px'},
95 property
: 'border-image-width',
99 {at
: -0.3, is
: '0%'}, // CSS border-image-width can't be negative.
102 {at
: 0.6, is
: '12%'},
104 {at
: 1.5, is
: '30%'},
108 assertInterpolation({
109 property
: 'border-image-width',
113 {at
: -0.3, is
: '0'}, // CSS border-image-width can't be negative.
122 assertInterpolation({
123 property
: 'border-image-width',
124 from: '10px 20% 30 40px',
125 to
: '80px 70% 60 50px'
127 {at
: -0.3, is
: '0px 5% 21 37px'}, // CSS border-image-width can't be negative.
128 {at
: 0, is
: '10px 20% 30 40px'},
129 {at
: 0.3, is
: '31px 35% 39 43px'},
130 {at
: 0.6, is
: '52px 50% 48 46px'},
131 {at
: 1, is
: '80px 70% 60 50px'},
132 {at
: 1.5, is
: '115px 95% 75 55px'},
133 {at
: 5, is
: '360px 270% 180 90px'},
134 {at
: 10, is
: '710px 520% 330 140px'}
136 assertInterpolation({
137 property
: 'border-image-width',
141 // Percentages are relative to the size of the border image area, which is 120px.
142 {at
: -0.3, is
: 'calc(13% + -6px)'}, // Should be parsed as 16px - 6px = 10px
143 {at
: 0, is
: '10%'}, // Should be parsed as 12px
144 {at
: 0.3, is
: 'calc(7% + 6px)'}, // Should be parsed as 8px + 6px = 14px
145 {at
: 0.6, is
: 'calc(4% + 12px)'}, // Should be parsed as 5px + 12px = 17px
147 {at
: 1.5, is
: 'calc(-5% + 30px)'}, // Should be parsed as -6px + 30px = 24px
149 assertInterpolation({
150 property
: 'border-image-width',
154 // Percentages are relative to the size of the border image area, which is 120px.
155 {at
: -0.3, is
: 'calc(13px + -6%)'}, // Should be parsed as 13px - 7px = 6px
157 {at
: 0.3, is
: 'calc(7px + 6%)'}, // Should be parsed as 7px + 7px = 14px
158 {at
: 0.6, is
: 'calc(4px + 12%)'}, // Should be parsed as 4px + 14px = 18px
159 {at
: 1, is
: '20%'}, // Should be parsed as 24px
160 {at
: 1.5, is
: 'calc(-5px + 30%)'}, // Should be parsed as -5px + 36px = 31px
163 assertInterpolation({
164 property
: 'border-image-width',
168 {at
: -0.3, is
: '10px'},
170 {at
: 0.3, is
: '10px'},
175 assertInterpolation({
176 property
: 'border-image-width',
180 {at
: -0.3, is
: '10'},
183 {at
: 0.6, is
: '20px'},
185 {at
: 1.5, is
: '20px'},
187 assertInterpolation({
188 property
: 'border-image-width',
192 {at
: -0.3, is
: '10%'},
194 {at
: 0.3, is
: '10%'},
199 assertInterpolation({
200 property
: 'border-image-width',
204 {at
: -0.3, is
: '10'},
207 {at
: 0.6, is
: '20%'},
209 {at
: 1.5, is
: '20%'},