A CSS-Only Clock
css-tricks.com
css-tricks.com
Headline is false. I was excited about it, too.
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.
CSS-only Interactive, Swipeable Image Carousel
https://matemarschalko.medium.com/css-only-interactive-swipe...
Animated page scroll with HTML and CSS only
https://levelup.gitconnected.com/animated-page-scroll-with-h...
Except i guess things like https://www.amazon.ca/Infinity-Itc-Atomic-Clock-Controlled/d... which do actually auto set the current time.
That's similar to how the computer fetches the current time from the quartz crystal on startup.
https://www.quaxio.com/pure_css_digital_clock.html
CSS only digital clock "best viewed at noon or midnight". Discussed at https://news.ycombinator.com/item?id=25595439
Of course this one is no different and can't tell the current time.
// 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);
}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.
I think this demo is packed with clever tricks and I've actually learned more than I expected.
Congrats to the author and thanks for posting.