Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(drawer): drawer content repainting on scroll #7719

Merged
merged 1 commit into from
Oct 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/lib/sidenav/drawer.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import '../core/style/variables';
@import '../core/style/elevation';
@import '../core/style/layout-common';
@import '../core/style/vendor-prefixes';
@import '../../cdk/a11y/a11y';

$mat-drawer-content-z-index: 1;
Expand Down Expand Up @@ -79,6 +80,9 @@ $mat-drawer-over-drawer-z-index: 4;
}

.mat-drawer-content {
// `backface-visibility` prevents the element from repainting on scroll. This is the
// equivalent of using `translateZ(0)`, but it doesn't create a new stacking context.
@include backface-visibility(hidden);
@include mat-drawer-stacking-context($mat-drawer-content-z-index);

display: block;
Expand Down