Skip to content

Commit

Permalink
perf(sidenav): avoid extra repaints while scrolling (#2156)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
crisbeto authored and jelbourn committed Dec 20, 2016
1 parent 4f5b9c5 commit b967712
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/sidenav/sidenav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit b967712

Please sign in to comment.