Skip to content

Commit 857c217

Browse files
devversionjelbourn
authored andcommitted
perf(dialog): switch dialog animations to translate3d (#3905)
* Switches the `translate` to `translate3d` for hardware accelerated animations.
1 parent f412499 commit 857c217

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/dialog/dialog-container.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ export type MdDialogContainerAnimationState = 'void' | 'enter' | 'exit' | 'exit-
4141
encapsulation: ViewEncapsulation.None,
4242
animations: [
4343
trigger('slideDialog', [
44-
state('void', style({ transform: 'translateY(25%) scale(0.9)', opacity: 0 })),
45-
state('enter', style({ transform: 'translateY(0%) scale(1)', opacity: 1 })),
46-
state('exit', style({ transform: 'translateY(25%)', opacity: 0 })),
44+
state('void', style({ transform: 'translate3d(0, 25%, 0) scale(0.9)', opacity: 0 })),
45+
state('enter', style({ transform: 'translate3d(0, 0, 0) scale(1)', opacity: 1 })),
46+
state('exit', style({ transform: 'translate3d(0, 25%, 0)', opacity: 0 })),
4747
transition('* => *', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),
4848
])
4949
],

0 commit comments

Comments
 (0)