compound-web
bca8ee55 - Disable hover styles on touchscreen devices

Commit
2 years ago
Disable hover styles on touchscreen devices Browsers on devices like phones and tablets often use an invisible, simulated cursor as a way to let mobile users activate the hover states of elements. This means that when you press a Compound button, on mobile, the button will stay in the hover state until you tap somewhere else on the page. This looks unnatural, so I suggest we opt out of this behavior for devices whose primary input device does not support hovering. We can, however, refer to the :active pseudo-class to still display these hover states for the duration that the element is being pressed.
Author
Committer
Parents
Loading