Skip to content
Browse files

Updated transition mixin to support variable arguments

  • Loading branch information...
1 parent 7676ea5 commit 4403036ed3432b4cee7c7e6884d84342e936de65 Phil LaPier committed Sep 14, 2012
Showing with 9 additions and 13 deletions.
  1. +9 −13 app/assets/stylesheets/css3/_transition.scss
View
22 app/assets/stylesheets/css3/_transition.scss
@@ -3,20 +3,17 @@
// @include transition ((opacity, width), (1.0s, 2.0s), ease-in, (0, 2s));
// @include transition ($property:(opacity, width), $delay: (1.5s, 2.5s));
-@mixin transition ($prop-1: all 0.15s ease-out 0,
- $prop-2: false, $prop-3: false,
- $prop-4: false, $prop-5: false,
- $prop-6: false, $prop-7: false,
- $prop-8: false, $prop-9: false)
- {
- $full: compact($prop-1, $prop-2, $prop-3, $prop-4, $prop-5,
- $prop-6, $prop-7, $prop-8, $prop-9);
-
- @include prefixer(transition, $full, webkit, moz, ms, o);
+@mixin transition ($properties...) {
+ @if length($properties) >= 1 {
+ @include prefixer(transition, $properties, webkit, moz, ms, o);
+ }
+
+ @else {
+ $properties: all 0.15s ease-out 0;
+ @include prefixer(transition, $properties, webkit, moz, ms, o);
+ }
}
-
-
@mixin transition-property ($properties...) {
-webkit-transition-property: transition-property-names($properties, 'webkit');
-moz-transition-property: transition-property-names($properties, 'moz');
@@ -37,4 +34,3 @@
@mixin transition-delay ($times...) {
@include prefixer(transition-delay, $times, webkit, moz, ms, o);
}
-

0 comments on commit 4403036

Please sign in to comment.
Something went wrong with that request. Please try again.