-
-
Save zaus/3940024 to your computer and use it in GitHub Desktop.
SASS: Vendorize Mixin with editable vendors
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
// 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