-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cdk:scroll): update scroll blocked style (#660)
fix #586
- Loading branch information
Showing
2 changed files
with
48 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,2 @@ | ||
@import '../themes/default.less'; | ||
@import './reset.less'; | ||
|
||
// Used when disabling global scrolling. | ||
.@{cdk-prefix} { | ||
|
||
&-scroll-block { | ||
position: fixed; | ||
|
||
// Necessary for the content not to lose its width. Note that we're using 100%, instead of | ||
// 100vw, because 100vw includes the width plus the scrollbar, whereas 100% is the width | ||
// that the element had before we made it `fixed`. | ||
width: 100%; | ||
|
||
// Note: this will always add a scrollbar to whatever element it is on, which can | ||
// potentially result in double scrollbars. It shouldn't be an issue, because we won't | ||
// block scrolling on a page that doesn't have a scrollbar in the first place. | ||
overflow-y: scroll; | ||
|
||
// https://github.com/angular/material2/issues/15051 | ||
|
||
body { | ||
overflow-x: visible; | ||
} | ||
} | ||
} |