No disrespect, but I think you need to change the title. I came here very interested to find out how CSS could pass cursor position even though CSS does not handle these events and so they would usually need to be handled by JS and then passed via JS to CSS. Your article then shows a standard JS method for handling and passing the data. CSS isn’t passing anything here. It is receiving from JS. I think it is fair to say this article is about JS passing the data to CSS variables instead of JS passing the data via direct declarations, right? Not CSS “passing” data, but just using a CSS variable instead of direct declaration.
Again, no disrespect intended at all, just want to help you avoid others coming here and finding the same thing and being grumpy with you about it. :)
I've actually just realised that on a whim and changed the title immediately! I have absolutely no intention to mislead anyone, because of course it isn't currently possible to actually catch any sort of event with CSS.
I hope this tiny change in the title makes things a lot clearer.
No disrespect, but I think you need to change the title. I came here very interested to find out how CSS could pass cursor position even though CSS does not handle these events and so they would usually need to be handled by JS and then passed via JS to CSS. Your article then shows a standard JS method for handling and passing the data. CSS isn’t passing anything here. It is receiving from JS. I think it is fair to say this article is about JS passing the data to CSS variables instead of JS passing the data via direct declarations, right? Not CSS “passing” data, but just using a CSS variable instead of direct declaration.
Again, no disrespect intended at all, just want to help you avoid others coming here and finding the same thing and being grumpy with you about it. :)
I've actually just realised that on a whim and changed the title immediately! I have absolutely no intention to mislead anyone, because of course it isn't currently possible to actually catch any sort of event with CSS.
I hope this tiny change in the title makes things a lot clearer.
Yep! Perfect!