-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(cdk/scrolling): make scroller element configurable for virtual scrolling #24394
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
Changes from all commits
36398cd
55f41ba
6b79cd0
c0895db
37dce93
779282f
8128960
5374edf
a37dbee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,14 +27,18 @@ | |
} | ||
|
||
|
||
// Scrolling container. | ||
// viewport | ||
cdk-virtual-scroll-viewport { | ||
display: block; | ||
position: relative; | ||
overflow: auto; | ||
contain: strict; | ||
transform: translateZ(0); | ||
} | ||
|
||
// Scrolling container. | ||
.cdk-virtual-scrollable { | ||
overflow: auto; | ||
will-change: scroll-position; | ||
contain: strict; | ||
-webkit-overflow-scrolling: touch; | ||
} | ||
|
||
|
@@ -69,19 +73,14 @@ cdk-virtual-scroll-viewport { | |
// set if it were rendered all at once. This ensures that the scrollable content region is the | ||
// correct size. | ||
.cdk-virtual-scroll-spacer { | ||
position: absolute; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @spike-rabbit I started looking into why some tests were failing internally with this change, and it looked like some people were setting I think we could definitely question why they're making it I also notice that below you still have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mmalerba changed as you requested |
||
top: 0; | ||
left: 0; | ||
height: 1px; | ||
width: 1px; | ||
transform-origin: 0 0; | ||
flex: 0 0 auto; // prevents spacer from collapsing if display: flex is applied | ||
|
||
// Note: We can't put `will-change: transform;` here because it causes Safari to not update the | ||
// viewport's `scrollHeight` when the spacer's transform changes. | ||
|
||
[dir='rtl'] & { | ||
right: 0; | ||
left: auto; | ||
transform-origin: 100% 0; | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.