I can't make my css transition working when the property to be updated is bind with [ngStyle] or [style.property]
HTML :
<div class="bar" [style.width]="size +'%'"></div>
CSS :
.bar{ width:0; transition: width .5s ease-out; }
JS : size is correctly updated...
To be sure, if i remove the style binding in html and update the width on :hover, transition is working. Do i miss something?
If i let the [style.width] binding and hover it for ex. with a width : 50%!important, transition works. Even though it's not what i want to achieve, it looks like ngStyle block the transitions. And !important is required.
But this is not working either :
[ngStyle]="{'width': size +'% !important'}"