JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
CSS
@property --hue{
syntax: "<number>";
inherits: false;
initial-value: 0;
}
:root{
--hue:0;
animation: hue 3s ease-in-out infinite alternate;
background-color:hsl(var(--hue),100%,50%);
}
@keyframes hue {
from {
--hue: 0
}
to {
--hue: 360
}
}
div{
background-color:hsl(var(--hue),100%,50%);
width:500px;
height:500px;
}