Skip to content

Commit 13410bd

Browse files
crisbetojelbourn
authored andcommitted
perf(menu,select): panel repainting on scroll (#7721)
Prevents the menu and select panels from repainting while scrolling. Fixes #7716.
1 parent 5ac7e11 commit 13410bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/core/style/_menu-common.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import './variables';
22
@import './elevation';
33
@import './list-common';
4+
@import './vendor-prefixes';
45

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

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

1617
@mixin mat-menu-base($default-elevation) {
1718
@include mat-overridable-elevation($default-elevation);
19+
20+
// Prevents the content from repainting on scroll.
21+
@include backface-visibility(hidden);
22+
1823
min-width: $mat-menu-overlay-min-width;
1924
max-width: $mat-menu-overlay-max-width;
2025
overflow: auto;

0 commit comments

Comments
 (0)