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

fix: avoid layout jumping on elements with ripples in RTL #10026

Merged
merged 1 commit into from
Feb 26, 2018
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions src/lib/core/style/_menu-common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ $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.
Copy link
Member Author

@crisbeto crisbeto Feb 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also open to keeping these and scoping them to something like &:not([dir='rtl']), but it could end up causing inconsistencies.

@include backface-visibility(hidden);

min-width: $mat-menu-overlay-min-width;
max-width: $mat-menu-overlay-max-width;
overflow: auto;
Expand Down
3 changes: 0 additions & 3 deletions src/lib/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ $mat-dialog-button-margin: 8px !default;
max-height: $mat-dialog-max-height;
overflow: auto;
-webkit-overflow-scrolling: touch;

// Promote the content to a new GPU layer to avoid repaints on scroll.
@include backface-visibility(hidden);
}

.mat-dialog-title {
Expand Down
3 changes: 0 additions & 3 deletions src/lib/sidenav/drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ $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
2 changes: 0 additions & 2 deletions src/lib/tabs/tab-body.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
@import '../core/style/vendor-prefixes';

.mat-tab-body-content {
// Avoids repainting while scrolling.
@include backface-visibility(hidden);
height: 100%;
overflow: auto;

Expand Down