Honestly, I feel like https://xkcd.com/169/ applies - the author is being intentionally misleading to generate views. Saying some sort of, "well technically [in a different context], yadda yadda" doesn't change that.
Maybe i could give some benefit of the doubt if they didn't include the word "current", but i see no way to read it as anything other than decitful once that word is included in the headline.
Just like real clocks: they don't magically set the right time when you pop in a battery and turn them on - generating the CSS vars in their own file to make sure that right time is used is pretty simple, and the equivalent to presetting a clock for someone when they buy it =)
Not sure if it's a well known trick, I usually have a JS function in a util library for setting CSS variable.
// Set value to the variable at the element, default to :root.
// e.g. setCssVar("--varFoo", 123)
function setCssVar(cssVar, value, elemSelector) {
let elem = document.querySelector(elemSelector || ":root");
elem.style.setProperty(cssVar, value);
}
I'm not a web developer at all and I guessed how I would do it from the title alone (including having the server send the initial values in the CSS)... but that feels like an awful lot of code for what amounts to 3 animated rotating divs.
Likewise, you can do a similar thing with a GIF image.
The article actually convinced me to turn on CSS animations (which I normally keep off to reduce distraction), in the hope that I could actually see a working example on the page, but unfortunately it seems it only contains images.
Headline is false. I was excited about it, too.