Add scroll-snap for mobile view (#147)

Mobile view is a bit icky to navigate.

I'm planning to work on an app-like mobile styling. But for now this would make it already a lot less annoying to use on mobile.
This commit is contained in:
Patrick Kontschak 2019-12-14 22:38:33 +01:00 committed by Roman Cervantes
parent abd8317848
commit ec62706b02
3 changed files with 13 additions and 0 deletions

View file

@ -1,5 +1,6 @@
<template lang="html"> <template lang="html">
<modal <modal
class="listAddButton"
ref="listAddModal" ref="listAddModal"
:title="title" :title="title"
@open="open" @open="open"
@ -141,6 +142,10 @@ export default {
<style lang="scss" rel="stylesheet/scss" scoped> <style lang="scss" rel="stylesheet/scss" scoped>
@import "src/styles/styles.scss"; @import "src/styles/styles.scss";
.listAddButton {
scroll-snap-align: center;
}
.add-list-button { .add-list-button {
margin-right: $gp; margin-right: $gp;
} }

View file

@ -266,6 +266,10 @@ export default {
display: grid; display: grid;
} }
@media($small) {
scroll-snap-align: center;
}
&.unique { &.unique {
@media($small) { @media($small) {
width: calc(100vw - 80px); width: calc(100vw - 80px);

View file

@ -147,6 +147,10 @@ export default {
overflow-x: auto; overflow-x: auto;
overflow-x: overlay; overflow-x: overlay;
display: flex; display: flex;
@media($small) {
scroll-snap-type: y mandatory;
}
} }
.list-placeholder { .list-placeholder {