January 3, 2013

Disable Text/Element Selection LESS Mixin

As per my previous post, if you want to disable multiple clicks selecting text or elements on a page then you can use this LESS mixin. Just call .user-select(none); in your declaration.

.user-select(@user-select) {
  -webkit-touch-callout: @user-select;
  -webkit-user-select: @user-select;
  -khtml-user-select: @user-select;
  -moz-user-select: @user-select;
  -ms-user-select: @user-select;
  user-select: @user-select;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

css.php