@nerdy.dev @una.im @bram.us I need help with something. I'm trying to use `@media (hover)` in production code for a few years but I always have problems with Samsung and some Xiaomi phones. They always report as having hover. (1/?)
Post
(2/?) There's this ticket on Chromium stating a possible cause and with some suggestions on how to fix it on the browser, since Samsung doesn't seem interested in fixing it. issues.chromium.org/issues/40855...
issues.chromium.orgChromium
ewww, devices reporting as having a "touchpad" instead of "touchscreen" wonder if you could work around it by combining media queries, testing things like developer.mozilla.org/en-US/docs/W...
developer.mozilla.orgpointer - CSS: Cascading Style Sheets | MDNThe pointer CSS media feature tests whether the user has a pointing device (such as a mouse), and if so, how accurate the primary pointing device is.
What I always end up doing is something like `@media (hover) and (width >= 1200px)`, since it covers iPads and Android tablets (this bug only happens on samsung phones). Funnily enough, Samsung tablets don't report hover even when used with an pen, which has hover and can generate mouseover events.
0 reposts0 likes
No replies yet.