Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-animations/animate-with-background-color-oklch-001.html - WPT Dashboard Interop Dashboard
<!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="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>