-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Webkit uses this tap color to highlight tapped form elements, links, and elements with various js events.
The current normalize.css removes the tap color, in order to solve an issue with delegated events outlined on the YUI blog. But removing the tap color entirely disables the valuable feedback that it provides when the user clicks a links or form element. I propose adding the highlight back in those cases.
The CSS would become:
input, select, textarea, button, a {-webkit-tap-highlight-color:#ccc; } /\* I think this is the right shade of gray... The opacity is not specified so that the native value will be used.. */This still isn't perfect:
-
When one of the elements listed above (input, select, etc.) is used to handle event delegation, the problem described at YUI will come back.
-
Any element which isn't one of those excepted above won't get a tap highlight when tapped (whether it's the true target of a delegated event or was tapped directly).
But both of these problems are somewhat rare and avoidable with good HTML/JS (make clickable elements <a>s with event handlers that preventDefault and don't use an <a> as your delegation handler), so I think the above CSS is acceptable.