blob: ac3ad0c2c2d76e19c6b4e794290006bdf0ac426e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<!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;
animation: test 1s;
}
</style>
<div id="target"></div>
<script>
CSS.registerProperty({
name: '--x',
syntax: '*',
inherits: false,
});
test(() => {
target.style.animationDelay = '-0.25s';
assert_equals(getComputedStyle(target).getPropertyValue('--x'), 'underlying', 'at 25%');
target.style.animationDelay = '-0.75s';
assert_equals(getComputedStyle(target).getPropertyValue('--x'), 'to', 'at 25%');
}, 'CSS Animations neutral keyframes on registered custom properties should produce the underlying value');
</script>
|