Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular-animate with height: auto; doesn't work [duplicate]

I want to make animation using angular-animate. My css rules is:

.expanded {
    transition: all ease 0.5s;
    overflow: hidden;
}
.expanded.ng-hide {
    height: 0px;
}

If I add, for example, height: 100px to .expanded class, then everything works fine. But how to make it works without height definition? I need this, because the content of .expanded container might be different.

like image 1000
splash27 Avatar asked Mar 24 '16 08:03

splash27


1 Answers

use * as auto,

example :

state('in', style({
        overflow: 'hidden',
        height: '*',
        width: '300px'
      })),
like image 189
Inderjeet Avatar answered Oct 21 '22 06:10

Inderjeet