3 ms·
> So it's possible with a tiny bit of JS Not really. expression() was evaluated by just moving the mouse around, which is what allowed attaching stuff to your
by mushyhammer 5y ago
> So it's possible with a tiny bit of JS
Not really. expression() was evaluated by just moving the mouse around, which is what allowed attaching stuff to your cursor with "just some CSS"
https://web.archive.org/web/20120420154658/http://msdn.microsoft.com/en-us/library/ms537634(v=VS.85).aspx https://web.archive.org/web/20120420154658/http://msdn.micro...
To do what expression() could do you need several event listeners at least which, I mean, of course you can still do it, but it's really unrelated to CSS Properties and just JavaScript at this point.
- err4nt 5y agoThis is actually part of the design of CSS custom properties. It's not an abuse, but part of how they've been designed to be used. You can trigger updates from your own code programmatically, as well as any event listeners (built-in or custom) or from Observers the browser may have (e.g. Resize Observer, Intersection Observer, Mutation Observer) or any other ways you want to update them!