Skip to content

Instantly share code, notes, and snippets.

@imlinus
Last active December 29, 2015 02:18
Show Gist options
  • Save imlinus/7599133 to your computer and use it in GitHub Desktop.
Save imlinus/7599133 to your computer and use it in GitHub Desktop.
user-select mixin/placeholder
// attributes: none | text | all | element
// Only call for mixin within media querys, otherwise use placeholder!
@mixin user-select($val: none) {
-webkit-touch-callout: $val;
@include prefix(user-select, $val);
}
%user-select-none { @include user-select(none); }
%user-select-text { @include user-select(text); }
%user-select-all { @include user-select(all); }
%user-select-element { @include user-select(element); }
// usage
.skinny-heading {
color: white;
font: {
size: 64px;
size: 4rem;
weight: 200;
}
@extend %user-select-none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment