fix: hide scrollbar on touch devices

This commit is contained in:
Sagar Vora 2021-05-03 16:03:03 +05:30
parent 17e1d03a47
commit ed2ca98502
2 changed files with 19 additions and 2 deletions

View file

@ -13,6 +13,22 @@ body.modal-open[style^="padding-right"] {
}
.modal {
// Same scrollbar as body
scrollbar-width: auto;
&::-webkit-scrollbar {
width: 12px;
height: 12px;
}
// Hide scrollbar on touch devices
@media(max-width: 991px) {
scrollbar-width: none;
&::-webkit-scrollbar {
width: 0;
height: 0;
}
}
.modal-content {
border-color: var(--border-color);
}
@ -29,6 +45,7 @@ body.modal-open[style^="padding-right"] {
font-weight: 500;
line-height: 2em;
font-size: $font-size-lg;
max-width: calc(100% - 80px);
}
.modal-actions {

View file

@ -4,7 +4,7 @@
scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
}
html, .modal {
html {
scrollbar-width: auto;
}
@ -23,7 +23,7 @@ html, .modal {
height: 6px;
}
body::-webkit-scrollbar, .modal::-webkit-scrollbar {
body::-webkit-scrollbar {
width: 12px;
height: 12px;
}