Both sides run identical CSS โ same var(), same transition,
same @keyframes. The only difference: the right side's variables are
registered with @property. Click and watch what a type unlocks.
@property / CSS.registerProperty(),
so both sides will behave like the unregistered one. Try a recent Chrome, Edge, Safari, or Firefox.
<angle> โ frozen<angle> โ spins/* Register the variables. That's the whole fix. */
@property --hue {
syntax: "<number>"; inherits: false; initial-value: 220;
}
@property --spin {
syntax: "<angle>"; inherits: false; initial-value: 0deg;
}
/* ...and the rest is the CSS you already wrote. */
.swatch { background: hsl(var(--hue) 78% 62%); transition: --hue .6s ease; }
.orb { background: conic-gradient(from var(--spin), โฆ); animation: spin 2s linear infinite; }
@keyframes spin { to { --spin: 360deg; } }