Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>CSS random(): random() values in -webkit-prefixed properties</title>
<meta name="assert" content="Use unprefixed property name for -webkit-prefixed property alias for caching random() values">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="test"></div>
<script>
test(() => {
const el = document.getElementById('test');
el.style["-webkit-animation-delay"] = "random(10s, 30s)";
let webkitAnimationDelayComputed = getComputedStyle(el)['-webkit-animation-delay'];
el.style["animation-delay"] = "random(10s, 30s)";
let animationDelayComputed = getComputedStyle(el)['animation-delay'];
assert_true(animationDelayComputed == webkitAnimationDelayComputed);
}, `Alias properties with property-dependant random() values should resolve to the same value`);
</script>