-
Notifications
You must be signed in to change notification settings - Fork 87
refactor: scroller and virtual-list overflow-indicators #10433
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
e6776af
5664e95
9a99340
c7ba52f
e9bdeb3
49f297b
98392c8
af737c5
6d6b2e4
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 |
|---|---|---|
|
|
@@ -8,46 +8,70 @@ import { css } from 'lit'; | |
|
|
||
| export const virtualListStyles = css` | ||
| :host { | ||
| /* Don't let these properties inherit */ | ||
| --vaadin-virtual-list-padding-block: 0px; | ||
| --vaadin-virtual-list-padding-inline: 0px; | ||
|
Comment on lines
+12
to
+13
Member
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. Are these supposed to be used by Aura? Also, should we document them in the JSDoc API?
Member
Author
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. I don't think themes would set those by default. They are intended more for app devs if they want to apply padding to the scroll containers. But regardless, they should be documented, yes. |
||
| --vaadin-virtual-list-overflow-indicator-top-opacity: 0; | ||
| --vaadin-virtual-list-overflow-indicator-bottom-opacity: 0; | ||
| display: block; | ||
| height: 400px; | ||
| overflow: auto; | ||
| flex: auto; | ||
| flex: 1; | ||
| align-self: stretch; | ||
| box-sizing: border-box; | ||
| padding: 0; | ||
| --_indicator-height: var(--vaadin-virtual-list-overflow-indicator-height, 1px); | ||
| } | ||
|
|
||
| :host([hidden]) { | ||
| display: none !important; | ||
| } | ||
|
|
||
| :host(:not([grid])) #items > ::slotted(*) { | ||
| width: 100%; | ||
| inset-inline: var(--vaadin-virtual-list-padding-inline); | ||
| } | ||
|
|
||
| #items { | ||
| position: relative; | ||
| } | ||
|
|
||
| :host([theme*='overflow-indicator'])::before, | ||
| :host([theme*='overflow-indicator'])::after { | ||
| :host::before, | ||
| :host::after { | ||
| content: ''; | ||
| display: none; | ||
| display: block; | ||
| opacity: 0; | ||
| position: sticky; | ||
| inset: 0; | ||
| z-index: 9999; | ||
| height: 1px; | ||
| margin-bottom: -1px; | ||
| background: var(--vaadin-virtual-list-border-color, var(--vaadin-border-color-secondary)); | ||
| pointer-events: none; | ||
| box-sizing: border-box; | ||
| height: var(--_indicator-height); | ||
| background: var(--vaadin-border-color-secondary); | ||
| } | ||
|
|
||
| :host([theme*='overflow-indicator'])::after { | ||
| margin-bottom: 0; | ||
| margin-top: -1px; | ||
| :host::before { | ||
| margin-bottom: calc(var(--vaadin-virtual-list-padding-block) - var(--_indicator-height)); | ||
| } | ||
|
|
||
| :host([theme~='overflow-indicator-top'][overflow~='top'])::before, | ||
| :host([theme~='overflow-indicators'][overflow~='top'])::before, | ||
| :host([theme~='overflow-indicators'][overflow~='bottom'])::after, | ||
| :host([theme~='overflow-indicator-bottom'][overflow~='bottom'])::after { | ||
| display: block; | ||
| :host::after { | ||
| margin-top: calc(var(--vaadin-virtual-list-padding-block) - var(--_indicator-height)); | ||
| } | ||
|
|
||
| :host([overflow~='top'])::before { | ||
| opacity: var(--vaadin-virtual-list-overflow-indicator-top-opacity); | ||
| } | ||
|
|
||
| :host([overflow~='bottom'])::after { | ||
| opacity: var(--vaadin-virtual-list-overflow-indicator-bottom-opacity); | ||
| } | ||
|
|
||
| :host([theme~='overflow-indicator-top'][overflow~='top']), | ||
| :host([theme~='overflow-indicators'][overflow~='top']) { | ||
| --vaadin-virtual-list-overflow-indicator-top-opacity: 1; | ||
| } | ||
|
|
||
| :host([theme~='overflow-indicators'][overflow~='bottom']), | ||
| :host([theme~='overflow-indicator-bottom'][overflow~='bottom']) { | ||
| --vaadin-virtual-list-overflow-indicator-bottom-opacity: 1; | ||
| } | ||
| `; | ||
Uh oh!
There was an error while loading. Please reload this page.