← Back to context

Comment by ImHereToVote

1 month ago

Browser don't support replacing cursor images natively for obvious reasons. You have to use JavaScript for that.

CSS supports replacing cursor images natively.

https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

  • In this case it looks like they didn't just want an image though, they wanted the cursor to invert the color of whatever part of the web page it's over, and to seamlessly morph into a selection highlight whenever you mouse over certain controls. Seems like that's a lot harder to make performant.

    • You can do that by changing the cursor icon for the elements in question. The CSS rule does support per-element swapping (because of course it does, that’s how a text input has a bar but a button has a pointer).

      4 replies →

  • another thing to block in firefox userContent.css as there doesn't appear to be an option for it in about:config

The only obvious reason I can think of is security concerns (some sort of user confusion), but JS wouldn't help with that. What other reasons are there?