Created
March 12, 2014 16:24
-
-
Save DarbyBrown/9510502 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
// ---- | |
// Sass (v3.3.1) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
$vendors-no-ms: '-webkit-' '-moz-' '-o-' '' !default; | |
@mixin transition-property($attr, $value) { | |
@each $vendor in $vendors-no-ms { | |
#{$vendor}transition-#{$attr}: $value; | |
} | |
} | |
@mixin transition-property-two($attr...) { | |
-webkit-transition-property: -webkit-#{$attr}; | |
-o-transition-property: -o-#{$attr}; | |
transition-property: -webkit-#{$attr}; | |
transition-property: $attr; | |
// @each $vendor in $vendors-no-ms { | |
// #{$vendor}transition-property: #{$vendor}#{$attr}; | |
// } | |
// transition-property: -webkit-#{$attr}; | |
// transition-property: -o-#{$attr}; | |
// transition-property: -webkit-#{$attr}; | |
// -webkit-transition-property: -webkit-#{$attr}; | |
} | |
@mixin transition-transform($attr...) { | |
$trans: (transform); | |
-webkit-transition-property: append(-webkit-#{$trans}, $attr, comma); | |
-o-transition-property: append(-webkit-#{$trans}, $attr, comma); | |
transition-property: append(-webkit-#{$trans}, $attr, comma); | |
transition-property: $trans; | |
} | |
.class-one { | |
@include transition-property(duration, 1s) | |
} | |
.class-two { | |
@include transition-property-two(color, opacity, color) | |
} | |
.class-three { | |
@include transition-transform() | |
} |
This file contains 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
.class-one { | |
-webkit-transition-duration: 1s; | |
-moz-transition-duration: 1s; | |
-o-transition-duration: 1s; | |
transition-duration: 1s; | |
} | |
.class-two { | |
-webkit-transition-property: -webkit-color, opacity, color; | |
-o-transition-property: -o-color, opacity, color; | |
transition-property: -webkit-color, opacity, color; | |
transition-property: color, opacity, color; | |
} | |
.class-three { | |
-webkit-transition-property: -webkit-transform; | |
-o-transition-property: -webkit-transform; | |
transition-property: -webkit-transform; | |
transition-property: transform; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment