6 -webkit-transition-property: fill, stroke, fill-opacity, stroke-opacity, stroke-width, stroke-dashoffset, stroke-miterlimit, kerning, baseline-shift, flood-color, flood-opacity, stop-color, stop-opacity, lighting-color;
7 -webkit-transition-duration: 2s;
8 -webkit-transition-timing-function: linear;
26 stroke-dashoffset: 10;
31 stroke: rgb(255, 0, 0);
39 fill: url(#gradient1);
42 fill: url(#gradient2);
46 stop-color: rgb(255,0,0);
50 stop-color: rgb(0,255,0);
79 fill: url(#invalid) black;
82 fill: url(#invalid) blue;
89 stroke-miterlimit: 12;
91 .animating #polyline1 {
92 stroke-miterlimit: 10;
101 baseline-shift: 10px;
106 flood-color: rgb(255, 0, 0);
110 flood-color: rgb(0, 255, 0);
114 lighting-color: rgb(255, 0, 0);
117 lighting-color: rgb(0, 255, 0);
120 <script src="resources/transition-test-helpers.js"></script>
122 const expectedValues = [
123 // [time, element-id, property, expected-value, tolerance]
124 [1, "rect1", "fill-opacity", 0.6, 0.1], // 1 -> 0.2
125 [1, "rect1", "stroke-width", 3, 0.5], // 2 -> 4
126 [1, "rect1", "stroke-opacity", 0.6, 0.1], // 1 -> 0.2
127 [1, "rect1", "stroke-dashoffset", 5, 1], // 0 -> 10
128 [1, "rect2", "fill", [0, 127, 127], 20], // rgb(0, 0, 255) -> rgb(0, 255, 0)
129 [1, "rect2", "stroke", [127, 0, 0], 20], // rgb(255, 0, 0) -> rgb(0, 0, 0)
130 [1, "rect4", "stroke-width", 8, 1], // 1px to 4mm
131 [1, "rect5", "stroke-width", 5, 1], // 0 to 10px
132 [1, "rect6", "stroke-width", 15, 2], // 10% to 20%
133 [1, "rect7", "fill", [0, 0, 127], 20], // url(#invalid) black -> url(#invalid) blue
134 [1, "stop1", "stop-color", [127, 127, 0], 20], // rgb(255,0,0) -> rgb(0, 255, 0)
135 [1, "stop1", "stop-opacity", 0.75, 0.1], // 1 -> 0.5
136 [1, "polyline1", "stroke-miterlimit", 11, 0.5], // 12 -> 10 (this is an abrupt change in rendering even though the property animation is smooth)
137 [1, "text1", "kerning", 5, 1], // 0 -> 10px
138 [1, "text1", "baseline-shift", 5, 1], // 0 -> 10px
139 [1, "flood1", "flood-opacity", 0.5, 0.1], // 1 -> 0
140 [1, "flood1", "flood-color", [127, 127, 0], 20], // rgb(0, 255, 0) -> rgb(255, 0, 0)
141 [1, "light1", "lighting-color", [127, 127, 0], 20], // rgb(255, 0, 0) -> rgb(0, 255, 0)
146 document.getElementById('container').className = 'animating';
149 runTransitionTest(expectedValues, setupTest, usePauseAPI);
155 <svg viewBox="0 0 160 120" width="400px" height="300px">
157 <linearGradient id="gradient1">
158 <stop id="stop1" offset="5%"/>
159 <stop offset="95%" stop-color="rgb(0,0,255)" />
161 <linearGradient id="gradient2">
162 <stop offset="10%" stop-color="rgb(0,255,255)" />
163 <stop offset="95%" stop-color="rgb(255, 0,255)" />
165 <filter id="filter1">
166 <feFlood id="flood1"/>
167 <feDiffuseLighting id="light1"/>
170 <rect id="rect1" x="10" y="10" width="30" height="30"/>
171 <rect id="rect2" x="90" y="10" width="30" height="30"/>
172 <rect id="rect3" x="90" y="60" width="30" height="20"/>
173 <rect id="rect4" x="10" y="100" width="10" height="10"/>
174 <rect id="rect5" x="50" y="100" width="10" height="10"/>
175 <rect id="rect6" x="90" y="100" width="10" height="10"/>
176 <rect id="rect7" x="130" y="100" width="10" height="10"/>
177 <polyline id="polyline1" points="10,70 60,75 10,80"/>
178 <text id="text1" x="100" y="60">Example</text>
182 <div id="result"></div>