perf(sidenav): avoid extra repaints while scrolling (#2156)

Avoids repaints while scrolling inside of a sidenav. This isn't an issue on desktop browsers, but can potentially be on mobile. This can be checked by going to the dev tools > console fold-out menu > Rendering > Scrolling Performance Issues.
This commit is contained in:
Kristiyan Kostadinov
2016-12-20 23:46:36 +02:00
committed by Jeremy Elbourn
parent 4f5b9c546e
commit b967712399
+3
View File
@@ -140,6 +140,9 @@ md-sidenav {
box-sizing: border-box;
height: 100%;
overflow-y: auto; // TODO(kara): revisit scrolling behavior for sidenavs
// Prevents unnecessary repaints while scrolling.
transform: translateZ(0);
}
}