An Interest In:
Web News this Week
- May 1, 2024
- April 30, 2024
- April 29, 2024
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
October 22, 2016 11:26 pm GMT
Original Link: http://www.stucox.com/blog/you-cant-detect-a-touchscreen/
You Cant Detect A Touchscreen
Stu Cox explains that there are a ton of ways you might think you can get a yes-or-no answer on whether a browser supports touch or not:
- Width media queries
- Touch-related DOM events
- Touch-related APIs
- Pointer media queries
The normal refrain around this is "there are devices that are both, so you'd be wrong on those," which is true, but it's actually more problematic than that. These testing methods are often just straight up wrong.
So:
For layouts, …
You Can’t Detect A Touchscreen is a post from CSS-Tricks
Original Link: http://www.stucox.com/blog/you-cant-detect-a-touchscreen/
Share this article:
Tweet
View Full Article