|
2 | 2 | <html> |
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8"> |
5 | | - <title>row-rule-outset interpolation</title> |
| 5 | + <title>row-rule-outset properties interpolation</title> |
6 | 6 | <link rel="author" title="Javier Contreras" href="mailto:javiercon@chromium.org"> |
7 | 7 | <link rel="help" href="https://drafts.csswg.org/css-gaps-1/#outset"> |
8 | 8 | <script src="/resources/testharness.js"></script> |
|
11 | 11 | <style> |
12 | 12 | .parent { |
13 | 13 | row-rule-style: solid; |
14 | | - row-rule-outset: 20px; |
| 14 | + row-rule-edge-start-outset: 20px; |
| 15 | + row-rule-edge-end-outset: 20px; |
| 16 | + row-rule-interior-start-outset: 20px; |
| 17 | + row-rule-interior-end-outset: 20px; |
15 | 18 | } |
16 | 19 |
|
17 | 20 | .target { |
|
21 | 24 | column-rule: 10px solid black; |
22 | 25 |
|
23 | 26 | row-rule-break: intersection; |
24 | | - row-rule-outset: 5px; |
| 27 | + row-rule-edge-start-outset: 5px; |
| 28 | + row-rule-edge-end-outset: 5px; |
| 29 | + row-rule-interior-start-outset: 5px; |
| 30 | + row-rule-interior-end-outset: 5px; |
25 | 31 | } |
26 | 32 | </style> |
27 | 33 | </head> |
28 | 34 | <body> |
29 | 35 | <script> |
30 | 36 | test_interpolation({ |
31 | | - property: 'row-rule-outset', |
| 37 | + property: 'row-rule-edge-start-outset', |
| 38 | + from: neutralKeyframe, |
| 39 | + to: '15px', |
| 40 | + }, [ |
| 41 | + { at: -0.3, expect: '2px' }, |
| 42 | + { at: 0, expect: '5px' }, |
| 43 | + { at: 0.3, expect: '8px' }, |
| 44 | + { at: 0.6, expect: '11px' }, |
| 45 | + { at: 1, expect: '15px' }, |
| 46 | + { at: 1.5, expect: '20px' }, |
| 47 | + ]); |
| 48 | + test_interpolation({ |
| 49 | + property: 'row-rule-edge-end-outset', |
| 50 | + from: neutralKeyframe, |
| 51 | + to: '15px', |
| 52 | + }, [ |
| 53 | + { at: -0.3, expect: '2px' }, |
| 54 | + { at: 0, expect: '5px' }, |
| 55 | + { at: 0.3, expect: '8px' }, |
| 56 | + { at: 0.6, expect: '11px' }, |
| 57 | + { at: 1, expect: '15px' }, |
| 58 | + { at: 1.5, expect: '20px' }, |
| 59 | + ]); |
| 60 | + test_interpolation({ |
| 61 | + property: 'row-rule-interior-start-outset', |
| 62 | + from: neutralKeyframe, |
| 63 | + to: '15px', |
| 64 | + }, [ |
| 65 | + { at: -0.3, expect: '2px' }, |
| 66 | + { at: 0, expect: '5px' }, |
| 67 | + { at: 0.3, expect: '8px' }, |
| 68 | + { at: 0.6, expect: '11px' }, |
| 69 | + { at: 1, expect: '15px' }, |
| 70 | + { at: 1.5, expect: '20px' }, |
| 71 | + ]); |
| 72 | + test_interpolation({ |
| 73 | + property: 'row-rule-interior-end-outset', |
32 | 74 | from: neutralKeyframe, |
33 | 75 | to: '15px', |
34 | 76 | }, [ |
|
41 | 83 | ]); |
42 | 84 |
|
43 | 85 | test_interpolation({ |
44 | | - property: 'row-rule-outset', |
| 86 | + property: 'row-rule-edge-start-outset', |
| 87 | + from: 'initial', // initial for `edge` is 0px. |
| 88 | + to: '10px', |
| 89 | + }, [ |
| 90 | + { at: -0.3, expect: '-3px' }, |
| 91 | + { at: 0, expect: '0px' }, |
| 92 | + { at: 0.3, expect: '3px' }, |
| 93 | + { at: 0.6, expect: '6px' }, |
| 94 | + { at: 1, expect: '10px' }, |
| 95 | + { at: 1.5, expect: '15px' }, |
| 96 | + ]); |
| 97 | + test_interpolation({ |
| 98 | + property: 'row-rule-edge-end-outset', |
| 99 | + from: 'initial', // initial for `edge` is 0px. |
| 100 | + to: '10px', |
| 101 | + }, [ |
| 102 | + { at: -0.3, expect: '-3px' }, |
| 103 | + { at: 0, expect: '0px' }, |
| 104 | + { at: 0.3, expect: '3px' }, |
| 105 | + { at: 0.6, expect: '6px' }, |
| 106 | + { at: 1, expect: '10px' }, |
| 107 | + { at: 1.5, expect: '15px' }, |
| 108 | + ]); |
| 109 | + test_interpolation({ |
| 110 | + property: 'row-rule-interior-start-outset', |
| 111 | + from: 'initial', // initial is 50%. |
| 112 | + to: '40%', |
| 113 | + }, [ |
| 114 | + { at: -0.3, expect: '53%' }, |
| 115 | + { at: 0, expect: '50%' }, |
| 116 | + { at: 0.3, expect: '47%' }, |
| 117 | + { at: 0.6, expect: '44%' }, |
| 118 | + { at: 1, expect: '40%' }, |
| 119 | + { at: 1.5, expect: '35%' }, |
| 120 | + ]); |
| 121 | + test_interpolation({ |
| 122 | + property: 'row-rule-interior-end-outset', |
45 | 123 | from: 'initial', // initial is 50%. |
46 | 124 | to: '40%', |
47 | 125 | }, [ |
|
54 | 132 | ]); |
55 | 133 |
|
56 | 134 | test_interpolation({ |
57 | | - property: 'row-rule-outset', |
| 135 | + property: 'row-rule-edge-start-outset', |
| 136 | + from: 'inherit', |
| 137 | + to: '10px', |
| 138 | + }, [ |
| 139 | + { at: -0.3, expect: '23px' }, |
| 140 | + { at: 0, expect: '20px' }, |
| 141 | + { at: 0.3, expect: '17px' }, |
| 142 | + { at: 0.6, expect: '14px' }, |
| 143 | + { at: 1, expect: '10px' }, |
| 144 | + { at: 1.5, expect: '5px' }, |
| 145 | + ]); |
| 146 | + test_interpolation({ |
| 147 | + property: 'row-rule-edge-end-outset', |
| 148 | + from: 'inherit', |
| 149 | + to: '10px', |
| 150 | + }, [ |
| 151 | + { at: -0.3, expect: '23px' }, |
| 152 | + { at: 0, expect: '20px' }, |
| 153 | + { at: 0.3, expect: '17px' }, |
| 154 | + { at: 0.6, expect: '14px' }, |
| 155 | + { at: 1, expect: '10px' }, |
| 156 | + { at: 1.5, expect: '5px' }, |
| 157 | + ]); |
| 158 | + test_interpolation({ |
| 159 | + property: 'row-rule-interior-start-outset', |
| 160 | + from: 'inherit', |
| 161 | + to: '10px', |
| 162 | + }, [ |
| 163 | + { at: -0.3, expect: '23px' }, |
| 164 | + { at: 0, expect: '20px' }, |
| 165 | + { at: 0.3, expect: '17px' }, |
| 166 | + { at: 0.6, expect: '14px' }, |
| 167 | + { at: 1, expect: '10px' }, |
| 168 | + { at: 1.5, expect: '5px' }, |
| 169 | + ]); |
| 170 | + test_interpolation({ |
| 171 | + property: 'row-rule-interior-end-outset', |
58 | 172 | from: 'inherit', |
59 | 173 | to: '10px', |
60 | 174 | }, [ |
|
67 | 181 | ]); |
68 | 182 |
|
69 | 183 | test_interpolation({ |
70 | | - property: 'row-rule-outset', |
| 184 | + property: 'row-rule-edge-start-outset', |
| 185 | + from: 'unset', |
| 186 | + to: '10px', |
| 187 | + }, [ |
| 188 | + { at: -0.3, expect: '-3px' }, |
| 189 | + { at: 0, expect: '0px' }, |
| 190 | + { at: 0.3, expect: '3px' }, |
| 191 | + { at: 0.6, expect: '6px' }, |
| 192 | + { at: 1, expect: '10px' }, |
| 193 | + { at: 1.5, expect: '15px' }, |
| 194 | + ]); |
| 195 | + test_interpolation({ |
| 196 | + property: 'row-rule-edge-end-outset', |
| 197 | + from: 'unset', |
| 198 | + to: '10px', |
| 199 | + }, [ |
| 200 | + { at: -0.3, expect: '-3px' }, |
| 201 | + { at: 0, expect: '0px' }, |
| 202 | + { at: 0.3, expect: '3px' }, |
| 203 | + { at: 0.6, expect: '6px' }, |
| 204 | + { at: 1, expect: '10px' }, |
| 205 | + { at: 1.5, expect: '15px' }, |
| 206 | + ]); |
| 207 | + test_interpolation({ |
| 208 | + property: 'row-rule-interior-start-outset', |
| 209 | + from: 'unset', |
| 210 | + to: '40%', |
| 211 | + }, [ |
| 212 | + { at: -0.3, expect: '53%' }, |
| 213 | + { at: 0, expect: '50%' }, |
| 214 | + { at: 0.3, expect: '47%' }, |
| 215 | + { at: 0.6, expect: '44%' }, |
| 216 | + { at: 1, expect: '40%' }, |
| 217 | + { at: 1.5, expect: '35%' }, |
| 218 | + ]); |
| 219 | + test_interpolation({ |
| 220 | + property: 'row-rule-interior-end-outset', |
71 | 221 | from: 'unset', |
72 | 222 | to: '40%', |
73 | 223 | }, [ |
|
80 | 230 | ]); |
81 | 231 |
|
82 | 232 | test_interpolation({ |
83 | | - property: 'row-rule-outset', |
| 233 | + property: 'row-rule-edge-start-outset', |
| 234 | + from: '-5px', |
| 235 | + to: '5px' |
| 236 | + }, [ |
| 237 | + { at: -0.3, expect: '-8px' }, // row-rule-edge-start-outset can be negative |
| 238 | + { at: 0, expect: '-5px' }, |
| 239 | + { at: 0.3, expect: '-2px' }, |
| 240 | + { at: 0.6, expect: '1px' }, |
| 241 | + { at: 1, expect: '5px' }, |
| 242 | + { at: 1.5, expect: '10px' }, |
| 243 | + ]); |
| 244 | + test_interpolation({ |
| 245 | + property: 'row-rule-edge-end-outset', |
| 246 | + from: '-5px', |
| 247 | + to: '5px' |
| 248 | + }, [ |
| 249 | + { at: -0.3, expect: '-8px' }, // row-rule-edge-end-outset can be negative |
| 250 | + { at: 0, expect: '-5px' }, |
| 251 | + { at: 0.3, expect: '-2px' }, |
| 252 | + { at: 0.6, expect: '1px' }, |
| 253 | + { at: 1, expect: '5px' }, |
| 254 | + { at: 1.5, expect: '10px' }, |
| 255 | + ]); |
| 256 | + test_interpolation({ |
| 257 | + property: 'row-rule-interior-start-outset', |
84 | 258 | from: '-5px', |
85 | 259 | to: '5px' |
86 | 260 | }, [ |
87 | | - { at: -0.3, expect: '-8px' }, // row-rule-outset can be negative |
| 261 | + { at: -0.3, expect: '-8px' }, // row-rule-interior-start-outset can be negative |
| 262 | + { at: 0, expect: '-5px' }, |
| 263 | + { at: 0.3, expect: '-2px' }, |
| 264 | + { at: 0.6, expect: '1px' }, |
| 265 | + { at: 1, expect: '5px' }, |
| 266 | + { at: 1.5, expect: '10px' }, |
| 267 | + ]); |
| 268 | + test_interpolation({ |
| 269 | + property: 'row-rule-interior-end-outset', |
| 270 | + from: '-5px', |
| 271 | + to: '5px' |
| 272 | + }, [ |
| 273 | + { at: -0.3, expect: '-8px' }, // row-rule-interior-end-outset can be negative |
88 | 274 | { at: 0, expect: '-5px' }, |
89 | 275 | { at: 0.3, expect: '-2px' }, |
90 | 276 | { at: 0.6, expect: '1px' }, |
|
93 | 279 | ]); |
94 | 280 |
|
95 | 281 | test_interpolation({ |
96 | | - property: 'row-rule-outset', |
| 282 | + property: 'row-rule-edge-start-outset', |
| 283 | + from: '100%', |
| 284 | + to: '1px', |
| 285 | + }, [ |
| 286 | + { at: -0.3, expect: 'calc(130% - 0.3px)' }, |
| 287 | + { at: 0, expect: '100%' }, |
| 288 | + { at: 0.3, expect: 'calc(70% + 0.3px)' }, |
| 289 | + { at: 0.6, expect: 'calc(40% + 0.6px)' }, |
| 290 | + { at: 1, expect: 'calc(0% + 1px)' }, |
| 291 | + { at: 1.5, expect: 'calc(-50% + 1.5px)' }, |
| 292 | + ]); |
| 293 | + test_interpolation({ |
| 294 | + property: 'row-rule-edge-end-outset', |
| 295 | + from: '100%', |
| 296 | + to: '1px', |
| 297 | + }, [ |
| 298 | + { at: -0.3, expect: 'calc(130% - 0.3px)' }, |
| 299 | + { at: 0, expect: '100%' }, |
| 300 | + { at: 0.3, expect: 'calc(70% + 0.3px)' }, |
| 301 | + { at: 0.6, expect: 'calc(40% + 0.6px)' }, |
| 302 | + { at: 1, expect: 'calc(0% + 1px)' }, |
| 303 | + { at: 1.5, expect: 'calc(-50% + 1.5px)' }, |
| 304 | + ]); |
| 305 | + test_interpolation({ |
| 306 | + property: 'row-rule-interior-start-outset', |
| 307 | + from: '100%', |
| 308 | + to: '1px', |
| 309 | + }, [ |
| 310 | + { at: -0.3, expect: 'calc(130% - 0.3px)' }, |
| 311 | + { at: 0, expect: '100%' }, |
| 312 | + { at: 0.3, expect: 'calc(70% + 0.3px)' }, |
| 313 | + { at: 0.6, expect: 'calc(40% + 0.6px)' }, |
| 314 | + { at: 1, expect: 'calc(0% + 1px)' }, |
| 315 | + { at: 1.5, expect: 'calc(-50% + 1.5px)' }, |
| 316 | + ]); |
| 317 | + test_interpolation({ |
| 318 | + property: 'row-rule-interior-end-outset', |
97 | 319 | from: '100%', |
98 | 320 | to: '1px', |
99 | 321 | }, [ |
|
106 | 328 | ]); |
107 | 329 |
|
108 | 330 | test_interpolation({ |
109 | | - property: 'row-rule-outset', |
| 331 | + property: 'row-rule-edge-start-outset', |
| 332 | + from: '10px', |
| 333 | + to: '10%', |
| 334 | + }, [ |
| 335 | + { at: -0.3, expect: 'calc(-3% + 13px)' }, |
| 336 | + { at: 0, expect: 'calc(0% + 10px)' }, |
| 337 | + { at: 0.3, expect: 'calc(3% + 7px)' }, |
| 338 | + { at: 0.6, expect: 'calc(6% + 4px)' }, |
| 339 | + { at: 1, expect: '10%' }, |
| 340 | + { at: 1.5, expect: 'calc(15% - 5px)' }, |
| 341 | + ]); |
| 342 | + test_interpolation({ |
| 343 | + property: 'row-rule-edge-end-outset', |
| 344 | + from: '10px', |
| 345 | + to: '10%', |
| 346 | + }, [ |
| 347 | + { at: -0.3, expect: 'calc(-3% + 13px)' }, |
| 348 | + { at: 0, expect: 'calc(0% + 10px)' }, |
| 349 | + { at: 0.3, expect: 'calc(3% + 7px)' }, |
| 350 | + { at: 0.6, expect: 'calc(6% + 4px)' }, |
| 351 | + { at: 1, expect: '10%' }, |
| 352 | + { at: 1.5, expect: 'calc(15% - 5px)' }, |
| 353 | + ]); |
| 354 | + test_interpolation({ |
| 355 | + property: 'row-rule-interior-start-outset', |
| 356 | + from: '10px', |
| 357 | + to: '10%', |
| 358 | + }, [ |
| 359 | + { at: -0.3, expect: 'calc(-3% + 13px)' }, |
| 360 | + { at: 0, expect: 'calc(0% + 10px)' }, |
| 361 | + { at: 0.3, expect: 'calc(3% + 7px)' }, |
| 362 | + { at: 0.6, expect: 'calc(6% + 4px)' }, |
| 363 | + { at: 1, expect: '10%' }, |
| 364 | + { at: 1.5, expect: 'calc(15% - 5px)' }, |
| 365 | + ]); |
| 366 | + test_interpolation({ |
| 367 | + property: 'row-rule-interior-end-outset', |
110 | 368 | from: '10px', |
111 | 369 | to: '10%', |
112 | 370 | }, [ |
|
0 commit comments