]> git.cworth.org Git - lmno.games/commitdiff
Only apply hover effects on devices with a true pointer
authorCarl Worth <cworth@cworth.org>
Fri, 6 Mar 2026 14:16:41 +0000 (09:16 -0500)
committerCarl Worth <cworth@cworth.org>
Fri, 6 Mar 2026 16:29:48 +0000 (11:29 -0500)
Prior to this change, the "stuck" button was staying stuck (ha!) with
styling as if hovered even after the user was done pressing it.

letterrip/letterrip.css

index 248f902503fb6afd105dd5b809b9c4ef46cbefc7..09243eabfc9b18bc099915a04b905f8d2f7f0936 100644 (file)
   color: #333;
 }
 
-.controls button.stuck-btn:hover {
-  background: #e0e0e0;
+/* Only apply hover effects on devices with a true pointer, avoiding
+   sticky :hover on mobile where there's no "unhover" event. */
+@media (hover: hover) {
+  .controls button.stuck-btn:hover {
+    background: #e0e0e0;
+  }
+  .controls button.stuck-active:hover {
+    background: #cf6d13;
+  }
 }
 
 .controls button.stuck-active {