Skip to content

Instantly share code, notes, and snippets.

@timothydang
Created October 12, 2011 04:58
Show Gist options
  • Save timothydang/1280330 to your computer and use it in GitHub Desktop.
Save timothydang/1280330 to your computer and use it in GitHub Desktop.
Disable text selection highlighting
* {
-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 */
/* make transparent link & text selection */
-webkit-tap-highlight-color: rgba(0,0,0,0);
::selection { background: transparent; }
::-moz-selection { background: transparent; }
/* prevent copy paste, to allow, change 'none' to 'text' */
-webkit-user-select: none;
-moz-user-select: -moz-none;
-khtml-user-select: none;
-o-user-select: none;
user-select: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment