Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to have mobile turned off #47

Open
tholman opened this issue Jan 25, 2023 · 2 comments
Open

Option to have mobile turned off #47

tholman opened this issue Jan 25, 2023 · 2 comments

Comments

@tholman
Copy link
Owner

tholman commented Jan 25, 2023

Setting for all cursors to not init on mobile/touch devices. Defaulted to off.

@meewgumi
Copy link

Hacky workaround I'm using for now:

/* smartphones, touchscreens */
@media (hover: none) and (pointer: coarse) {
	canvas {
		display: none;
	}
}

/* Nintendo Wii controller, Microsoft Kinect */
@media (hover: hover) and (pointer: coarse) {
	canvas {
		display: none;
	}
}

source for media queries

luckily my project only has one canvas but it would be cool if this script gave it a unique class or ID so we can target it with CSS in the future

@arlenpeiffer
Copy link

+1 on the idea of having a unique id/class that could be used to apply any additional styles to the canvas element ! thanks for the super fun project 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants