Last active
April 3, 2020 23:44
-
-
Save nathos/4611077 to your computer and use it in GitHub Desktop.
Sass (SCSS) mixin to disable user-select on an element
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin no-select { | |
-webkit-touch-callout: none; | |
-webkit-user-select: none; | |
-khtml-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} |
Great, it works for me! Thanks.
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-touch-callout: none;
-ms-text-size-adjust: none;
-webkit-text-size-adjust: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just putting this here for my own reference, but this already exists in Compass.