blob: c673cefc4ba85258b488b605146612ee809b5704 [file] [log] [blame] [edit]
<!DOCTYPE html>
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@keyframes test {
to { --x: to; }
}
#target {
--x: underlying;
}
</style>
<div id="target"></div>
<script>
CSS.registerProperty({
name: '--x',
syntax: '*',
inherits: false,
});
test(() => {
target.style.animation = 'test 10s';
target.style.animationDelay = '-2.5s';
assert_equals(getComputedStyle(target).getPropertyValue('--x'), 'underlying', 'at 25%');
target.style.animationDelay = '-7.5s';
assert_equals(getComputedStyle(target).getPropertyValue('--x'), 'to', 'at 75%');
}, 'CSS Animations neutral keyframes on registered custom properties should produce the underlying value');
</script>