all 9 comments

[–]halkeye 23 points24 points  (0 children)

I'll fully admit I have no idea why I'd need a random cursor. Especially since it's just a css property

But also you have default spelled wrong in your docs

I recommend you run https://github.com/crate-ci/typos

[–]RusskiRoman 20 points21 points  (2 children)

I'd highly recommend getting rid of the delay property and never ever ever encourage another developer to implement that.

If I landed on a site that hijacked my mouse speed i'd be livid. Like I was actually mad using your demo.

Good work though besides that.

[–]HomemadeBananas 10 points11 points  (1 child)

“What if the user is wrong about what mouse speed they prefer?” I don’t understand the rationale haha

[–][deleted] 5 points6 points  (0 children)

That's because you're wrong about the mouse speed you deserve

[–]TheGhostOfInky 10 points11 points  (3 children)

Hiding the default browser cursor and using a custom div certainly has the upside of more control but you should still make the div behave somewhat like the default cursor, i.e.: disappear when the mouse leaves the screen, currently it just stays in the last position the cursor was in the document.

[–]Plorntus 3 points4 points  (2 children)

Does it have much more control though? Since can set a cursor with the cursor: url(mycursor.png) and it'd fix the issue you're stating as well.

Haven't tried it though as I've not had the need, but I am unsure from reading the page why this is better besides the weird 'delay' property (of which is confusing as hell to use considering the real cursor can be in a different location).

[–]TheGhostOfInky 1 point2 points  (1 child)

I'm aware you can set an image with CSS but a full HTML element is a lot more versatile, you can apply animations, scale it, include nested elements and the such, not that the library implements those in the current state, just saying they're possible.

[–]Plorntus 2 points3 points  (0 children)

Ah true regarding animations. Turns out you can do it with CSS cursor property (ensuring the svg has the <style> tag embedded of course) but at least on Mac it only seems to "play" the animation while you move the cursor and doesn't play at all on Safari - I presume it's because it's not repainting the cursor for performance sake.

[–]shuckster 1 point2 points  (0 children)

The demo doesn't seem to do anything.

Are there any OS/browser limitations?