Skip to content

Instantly share code, notes, and snippets.

@zaus
Forked from heroheman/gist:3907611
Last active October 11, 2015 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zaus/3940024 to your computer and use it in GitHub Desktop.
Save zaus/3940024 to your computer and use it in GitHub Desktop.
SASS: Vendorize Mixin with editable vendors
// edit for whichever you care about
$vendors: 'webkit', 'moz', 'ms'; // 'webkit', 'moz', 'ms', 'o', 'khtml';
/// @summary Repeat for multiple vendor prefixes, like prefix-free processor
/// @param $property the property to repeat
/// @param $noplain set 'true' to disable prefixless option
/// @param $vendors override the global vendor list
/// @param $prefix optional additional prefix; supposed to allow keyframe specification with `@`
///
/// @see http://css-tricks.com/redesigning-with-sass/ for references
@mixin vendorize($property, $value, $noplain: false, $vendors: $vendors, $prefix:'') {
@each $vendor in $vendors {
#{$prefix}-#{$vendor}-#{$property}: $value;
}
@if $noplain != true {
#{$property}: $value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment