blob: e80960278324f5eff9098f24895feaf70e2da1e9 [file] [log] [blame]
<!DOCTYPE html>
#container {
width: 400px;
height: 100px;
margin: 10px;
transition-property: text-shadow;
transition-duration: 1s;
transition-timing-function: linear;
#container {
text-shadow: yellow 0px 10px 10px,
yellow 0px 20px 10px,
yellow 0px 30px 10px,
yellow 0px 40px 10px,
yellow 0px 50px 10px;
} {
text-shadow: green 0px 10px 2px,
green 0px 20px 2px,
green 0px 30px 2px,
green 0px 40px 2px,
green 0px 50px 2px;
if (window.testRunner) {
function setupTest()
document.getElementById('container').className = 'final';
window.setTimeout(checkShadow, 0);
function checkShadow()
var container = document.getElementById('container');
var shadow = window.getComputedStyle(container).textShadow;
shadow = shadow.replace(/rgb([^)]*)/g, "color").split(",");
var result = document.getElementById('result');
if (shadow.length == 5)
result.innerHTML = 'PASS: saw 5 shadows during the transition';
result.innerHTML = 'FAIL: saw ' + shadow.length + ' shadows during the transition';
if (window.testRunner)
window.addEventListener('load', setupTest, false);
<div id="container">
Shadowed text
<div id="result"></div>