I have the following trigger in an Angular 4 component animation array:
trigger('collection', [
state('0', style({
'background-color': 'black',
'-webkit-box-flex': '0',
'-ms-flex': '0 0 0px',
flex: '0 0 0',
overflow: 'hidden',
'min-width': '0px',
})),
state('1', style({
'background-color': 'blue',
'-webkit-box-flex': '1',
'-ms-flex': '1 1 0px',
flex: '1 1 0',
'min-width': '450px',
})),
transition('0 => 1', animate('300ms ease-in')),
transition('1 => 0', animate('300ms ease-out'))
]),
The styles that are added inline to the element per browser are as follows:
State 0
IE 11 => overflow: hidden; min-width: 0px; background-color: black;
Chrome => background-color: black; -webkit-box-flex: 0; flex: 0 0 0px; overflow: hidden; min-width: 0px;
Edge => flex:0 0 0px; overflow: hidden; min-width: 0px; background-color: black;
State 1
IE 11 => min-width: 450px; background-color: blue;
Chrome => background-color: blue; -webkit-box-flex: 1; flex: 1 1 0px; min-width: 450px;
Edge => flex:1 1 0px; min-width: 450px; background-color: blue;
I ask this because, as you can probably tell, I am missing critical styles in IE, thus breaking the layout.
Edit 1) Just as an update, I never figured out exactly how the algorithm chooses which styles to place inline, but by finagling the css in the trigger state, I was able to solve my specific problem. Blatant luck helps sometimes I guess.