perf(dialog): avoid repaintin dialog content element on scroll (#6890)

Fixes the `<md-dialog-content>` element being repainted on scroll.

Fixes #6878.
This commit is contained in:
Kristiyan Kostadinov
2017-09-12 02:13:12 +02:00
committed by mmalerba
parent 27cbe47839
commit 51396d027f
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -33,4 +33,9 @@
cursor: -webkit-grabbing;
cursor: grabbing;
}
@mixin backface-visibility($value) {
-webkit-backface-visibility: $value;
backface-visibility: $value;
}
/* stylelint-enable */
+4
View File
@@ -1,4 +1,5 @@
@import '../core/style/elevation';
@import '../core/style/vendor-prefixes';
@import '../core/a11y/a11y';
@@ -35,6 +36,9 @@ $mat-dialog-button-margin: 8px !default;
max-height: $mat-dialog-max-height;
overflow: auto;
-webkit-overflow-scrolling: touch;
// Promote the content to a new GPU layer to avoid repaints on scroll.
@include backface-visibility(hidden);
}
.mat-dialog-title {