Files
sousa-gecko/testing/web-platform/tests/css/css-values/random-item-in-keyframe.html
T
Joanne Pan 9f8fc9e20c Bug 2054059 [wpt PR 61201] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=317702, a=testonly
Automatic update from web-platform-tests
WebKit export: [css-values-5 random-item()] computed-value resolution (parse `<random-key>`, select item) (#61201)

https://bugs.webkit.org/show_bug.cgi?id=317702
--

wpt-commits: 13b19fb7fb3b037001ebf8f6defa6b8888f71530
wpt-pr: 61201
2026-07-13 14:37:54 +00:00

27 lines
776 B
HTML

<!DOCTYPE html>
<title>CSS Values and Units Test: random-item() in @keyframes</title>
<link rel="help" href="https://drafts.csswg.org/css-values-5/#funcdef-random-item">
<link rel="author" title="Joanne Pan" href="https://github.com/J0pan">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@keyframes --anim {
from {
color: rgb(0, 0, 0);
color: random-item(fixed 0, rgb(1, 0, 0), rgb(0, 1, 0));
}
to {
color: rgb(0, 0, 0);
}
}
#target {
animation: --anim 1000s step-end;
}
</style>
<div id="target"></div>
<script>
test(() => {
assert_equals(getComputedStyle(target).color, "rgb(1, 0, 0)");
}, "random-item() is not ignored in a keyframe");
</script>