Skip to content

Instantly share code, notes, and snippets.

@mwbrooks
Created February 23, 2011 18:50
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save mwbrooks/840928 to your computer and use it in GitHub Desktop.
Save mwbrooks/840928 to your computer and use it in GitHub Desktop.
Remove Tap Highlight from Mobile Webkit
* {
-webkit-touch-callout:none; /* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust:none; /* prevent webkit from resizing text to fit */
-webkit-tap-highlight-color:rgba(0,0,0,0); /* prevent tap highlight color / shadow */
-webkit-user-select:none; /* prevent copy paste, to allow, change 'none' to 'text' */
}
@rowanwernham
Copy link

Have you ever noticed issues reenabling these properties for specific elements? i.e. allowing -webkit-touch-callout on some images, and -webkit-user-select on some text?

@andreszs
Copy link

webkit-user-select:none is a criminal attribute, you cannot type anything on input fields with that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment