Try out scroll snapping
This commit is contained in:
parent
3805a2f20e
commit
4e73c07cb2
2 changed files with 10 additions and 1 deletions
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
.inRoom {
|
||||
position: relative;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
min-height: 100%;
|
||||
|
@ -41,6 +40,7 @@ limitations under the License.
|
|||
|
||||
.footer {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
flex-grow: 1;
|
||||
padding: 0 22px;
|
||||
overflow-y: auto;
|
||||
scroll-snap-type: both mandatory;
|
||||
}
|
||||
|
||||
.slotGrid {
|
||||
|
@ -14,4 +15,12 @@
|
|||
}
|
||||
|
||||
.slot {
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
|
||||
.slot:last-child {
|
||||
/* This causes the grid to scroll up smoothly to the last item when its height
|
||||
shrinks, and ensures that the user can always scroll the last row fully in
|
||||
view */
|
||||
scroll-snap-align: end;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue