Skip to content

Instantly share code, notes, and snippets.

@tbremer
Created May 6, 2014 04:02
Show Gist options
  • Select an option

  • Save tbremer/11553075 to your computer and use it in GitHub Desktop.

Select an option

Save tbremer/11553075 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.2.19)
// Compass (v0.12.6)
// Bourbon (v3.1.8)
// ----
@import "bourbon/bourbon";
@mixin transition-transform($duration, $timing, $delay:0s, $preface:webkit moz ms o spec){
@each $browser in $preface {
@if( $browser == spec) {
transition: transform $duration $timing $delay;
} @else {
@include prefixer( transition, -#{$browser}-transform $duration $timing $delay, $browser);
}
}
}
@mixin transition-transform-2($duration, $timing, $delay:0s, $preface:webkit moz ms o spec){
@each $browser in $preface {
@if( $browser == spec) {
transition: transform $duration $timing $delay;
} @else {
-#{$browser}-transition: -#{$browser}-transform $duration $timing $delay;
}
}
}
body{
@include transition-transform(0.5s, linear);
/* line break */
@include transition-transform-2(0.5s, linear);
}
body {
-webkit-transition: -webkit-transform 0.5s linear 0s;
-moz-transition: -moz-transform 0.5s linear 0s;
-ms-transition: -ms-transform 0.5s linear 0s;
-o-transition: -o-transform 0.5s linear 0s;
transition: transform 0.5s linear 0s;
/* line break */
-webkit-transition: -webkit-transform 0.5s linear 0s;
-moz-transition: -moz-transform 0.5s linear 0s;
-ms-transition: -ms-transform 0.5s linear 0s;
-o-transition: -o-transform 0.5s linear 0s;
transition: transform 0.5s linear 0s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment