Skip to content

Instantly share code, notes, and snippets.

@meowsus
Created October 29, 2014 14:31
Show Gist options
  • Save meowsus/dc5f1549bd9171c56452 to your computer and use it in GitHub Desktop.
Save meowsus/dc5f1549bd9171c56452 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
@function property-prefixes($property, $prefixes: '-ms-' '-webkit-' '-o-' '-moz-') {
$properties: $property;
@each $prefix in $prefixes {
$properties: $properties #{$prefix}#{$property}
}
@return $properties;
}
@mixin transition($properties: all, $duration: 0.5s, $function: linear, $delay: 0) {
@each $property in $properties {
-webkit-transition: $property $duration $function $delay;
transition: $property $duration $function $delay;
}
}
.test {
@include transition($properties: transform -ms-transform -webkit-transform);
}
.test2 {
@include transition($properties: property-prefixes(transform, -ms- -webkit-));
}
.test {
-webkit-transition: transform 0.5s linear 0;
transition: transform 0.5s linear 0;
-webkit-transition: -ms-transform 0.5s linear 0;
transition: -ms-transform 0.5s linear 0;
-webkit-transition: -webkit-transform 0.5s linear 0;
transition: -webkit-transform 0.5s linear 0;
}
.test2 {
-webkit-transition: transform -ms-transform -webkit-transform 0.5s linear 0;
transition: transform -ms-transform -webkit-transform 0.5s linear 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment