mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
mmalerba
parent
27cbe47839
commit
51396d027f
@@ -33,4 +33,9 @@
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
@mixin backface-visibility($value) {
|
||||
-webkit-backface-visibility: $value;
|
||||
backface-visibility: $value;
|
||||
}
|
||||
/* stylelint-enable */
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user