Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do transitions on opacity in compass?

Tags:

compass-sass

We have excellent mixins for opacity and transitions in compass, but how can I do a transition on opacity?

@include single-transition(opacity, 1s);

Above line creates a transition on opacity, but not on -moz-opacity, -khtml-opacity, let alone the weird IE syntaxes...

like image 581
bert bruynooghe Avatar asked Oct 12 '13 20:10

bert bruynooghe


1 Answers

I think the following code (but also the code you posted) creates the animation with all the required prefixes.

@include transition(opacity, 1s ease-out);

Where 1s is any amount of seconds (2s, 0.5s) and ease-out is any kind of easing animation (could be just linear if no parameter).

like image 119
ozke Avatar answered Jan 03 '23 12:01

ozke