Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Animations Test: animation with background-color "oklch"</title>
<link rel="author" title="CGQAQ" href="mailto:m.jason.liu@gmail.com">
<link rel="help" href="https://www.w3.org/TR/css-animations-2/">
<link rel="match" href="animate-with-background-color-oklch-001-ref.html">
<meta name="assert" content="Check that the background-color is animated with oklch correctly">
<style>
@keyframes bg-color-oklch {
to {
background-color: oklch(45% 0.2 264); /* blue */
}
}
#box {
block-size: 200px;
inline-size: 200px;
background-color: #ff0000;
animation: linear 1s forwards bg-color-oklch;
}
</style>
<div id="box"></div>
<script>
window.onload = () => {
requestAnimationFrame(() => {
const anim = document.getAnimations()[0];
anim.finish();
requestAnimationFrame(() => {
document.documentElement.classList.remove("reftest-wait");
});
});
};
</script>
</html>