Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SASS/Compass Transitions

Is it possible to use Compass or SASS to output the following CSS transition that will output all the various vendor prefixes:

-webkit-transition: all 0.3s ease-in-out;

Can anyone point me to the correct library?

like image 708
dagda1 Avatar asked Jan 13 '13 06:01

dagda1


2 Answers

Mixin for creating animations using single or "all" property transitions

@include transition(PROPERTY DURATION DELAY(OPT) TIMING-FUNCTION)
@mixin transition($transition) {
  -webkit-transition: $transition;
     -moz-transition: $transition;
      -ms-transition: $transition;
       -o-transition: $transition;
          transition: $transition;
}

Mixin for creating animations using multiple property transitions

@include multi-transition("PROPERTY DURATION DELAY(OPT) TIMING-FUNCTION, PROPERTY DURATION DELAY(OPT) TIMING-FUNCTION")
@mixin multi-transition($transition) {
 -webkit-transition: #{$transition};
    -moz-transition: #{$transition};
     -ms-transition: #{$transition};
      -o-transition: #{$transition};
         transition: #{$transition};
}
like image 28
Mo. Avatar answered Oct 06 '22 02:10

Mo.


Use compass' transition mixin:

@include transition(all 0.3s ease-in-out);
like image 126
Joseph Silber Avatar answered Oct 06 '22 03:10

Joseph Silber