1 <!DOCTYPE html>
2 <html><head><meta charset="utf-8">
3 <title>CSS Basic User Interface Test: interpolable outline-* properties animation</title>
4 <link href="http://florian.rivoal.net" rel="author" title="Florian Rivoal">
5 <link href="https://drafts.csswg.org/css-ui-3/#propdef-outline-style" rel="help">
6 <link href="https://www.w3.org/TR/web-animations-1/#dom-animatable-animate" rel="help">
7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script>
9 <style>
10 @keyframes outline-anim {
11 from {
12 outline: solid 1px rgb(1,0,0);
13 outline-offset: 1px;
14 }
15 to {
16 outline: solid 3px rgb(3,0,0);
17 outline-offset: 3px;
18 }
19 }
20
21 #test {
22 animation: outline-anim 3s -1.5s paused linear;
23 outline: solid 1px rgb(1,0,0);
24 outline-offset: 1px;
25 }
26 </style>
27 </head><body>
28 <div id="test"></div>
29 <div id="log"></div>
30
31 <script>
32 test(
33 function(){
34 var test = document.getElementById("test");
35 assert_equals(getComputedStyle(test).outlineColor, 'rgb(2, 0, 0)');
36 }, "outline-color is animated as a color");
37 test(
38 function(){
39 var test = document.getElementById("test");
40 assert_equals(getComputedStyle(test).outlineWidth, '2px');
41 }, "outline-width is animated as a length");
42 test(
43 function(){
44 var test = document.getElementById("test");
45 assert_equals(getComputedStyle(test).outlineOffset, '2px');
46 }, "outline-offset is animated as a length");
47 </script>
48
49 </body></html>