Skip to content

Commit

Permalink
perf(menu,select): panel repainting on scroll
Browse files Browse the repository at this point in the history
Prevents the menu and select panels from repainting while scrolling.

Fixes angular#7716.
  • Loading branch information
crisbeto committed Oct 11, 2017
1 parent 9b07712 commit 7213b1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/core/style/_menu-common.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import './variables';
@import './elevation';
@import './list-common';
@import './vendor-prefixes';

/** The mixins below are shared between mat-menu and mat-select */

Expand All @@ -15,6 +16,10 @@ $mat-menu-icon-margin: 16px !default;

@mixin mat-menu-base($default-elevation) {
@include mat-overridable-elevation($default-elevation);

// Prevents the content from repainting on scroll.
@include backface-visibility(hidden);

min-width: $mat-menu-overlay-min-width;
max-width: $mat-menu-overlay-max-width;
overflow: auto;
Expand Down

0 comments on commit 7213b1b

Please sign in to comment.