fix: Improved data table visibility on different devices

This change introduces new behavior for the data table.

If the device supports a fine pointer (mouse or touchpad) and a screen
width that is less than 1400px, we will set a max height on the table
allowing the horizontal scroll bar to be easily accessable.

If the device supports a coarse input (touch) we will not set a max
height on the table, because horizontal scrolling is a simple swipe.

If the device has a screen that is wider than 1400px we will not set a
max height on the table, as there would not be a horizontal scroll bar.
master
Ryan Carbotte 5 years ago
parent d048472a7d
commit d0e1ded041

@ -35,6 +35,7 @@ h2 {
.nook-phone { .nook-phone {
width: 100%; width: 100%;
max-width: 1400px;
box-sizing: border-box; box-sizing: border-box;
margin: 16px auto; margin: 16px auto;
border-radius: 40px; border-radius: 40px;
@ -300,6 +301,11 @@ input[type=number] {
border-radius: 2px; border-radius: 2px;
} }
@media only screen and (max-width: 1440px) and (pointer: fine) {
.table-wrapper {
max-height: calc(75vh - 40px);
}
}
.table-wrapper::-webkit-scrollbar { .table-wrapper::-webkit-scrollbar {
height: 8px; height: 8px;
@ -343,6 +349,7 @@ input[type=number] {
} }
#turnipTable td { #turnipTable td {
white-space: nowrap;
max-width: 100px; max-width: 100px;
padding: 6px 4px; padding: 6px 4px;
text-align: center; text-align: center;
@ -360,7 +367,7 @@ input[type=number] {
} }
#turnipTable .table-pattern { #turnipTable .table-pattern {
white-space: normal; white-space: nowrap;
} }

Loading…
Cancel
Save