Skip to content

Commit

Permalink
Support official css3 animation shorthand property
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil LaPier committed Nov 22, 2011
1 parent 93beb25 commit 5044e30
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions app/assets/stylesheets/css3/_animation.scss
Expand Up @@ -153,9 +153,19 @@
}
}

// Official animation shorthand property. Needs more work to actually be useful.
@mixin animation ($name, $duration, $timing-function, $delay, $iteration-count, $direction) {
-webkit-animation: $name $duration $timing-function $delay $iteration-count $direction;
-moz-animation: $name $duration $timing-function $delay $iteration-count $direction;
animation: $name $duration $timing-function $delay $iteration-count $direction;
// Official animation shorthand property.
@mixin animation ($animation-1,
$animation-2: false, $animation-3: false,
$animation-4: false, $animation-5: false,
$animation-6: false, $animation-7: false,
$animation-8: false, $animation-9: false)
{
$full: compact($animation-1, $animation-2, $animation-3, $animation-4,
$animation-5, $animation-6, $animation-7, $animation-8, $animation-9);

-webkit-animation: $full;
-moz-animation: $full;
-ms-animation: $full;
-o-animation: $full;
animation: $full;
}

0 comments on commit 5044e30

Please sign in to comment.