diff --git a/src/lib/core/style/_vendor-prefixes.scss b/src/lib/core/style/_vendor-prefixes.scss index d49e9af4f485..0eaf254033ec 100644 --- a/src/lib/core/style/_vendor-prefixes.scss +++ b/src/lib/core/style/_vendor-prefixes.scss @@ -33,4 +33,9 @@ cursor: -webkit-grabbing; cursor: grabbing; } + +@mixin backface-visibility($value) { + -webkit-backface-visibility: $value; + backface-visibility: $value; +} /* stylelint-enable */ diff --git a/src/lib/dialog/dialog.scss b/src/lib/dialog/dialog.scss index ab09312d4aeb..8ef8eea9df4c 100644 --- a/src/lib/dialog/dialog.scss +++ b/src/lib/dialog/dialog.scss @@ -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 {