feat: use the default style for the scrollbar in mobile

This commit is contained in:
Zeke Zhang 2024-08-07 17:29:07 +08:00
parent 4eb35a3ad9
commit e6e424c8a2

View File

@ -1,35 +1,46 @@
/* width */ // the custom style for desktop
::-webkit-scrollbar { @media (min-width: 768px) {
width: 8px; /* width */
height: 8px; ::-webkit-scrollbar {
width: 8px;
height: 8px;
}
/* Track */
::-webkit-scrollbar-track {
background: var(--colorBgScrollTrack);
}
/* Handle */
::-webkit-scrollbar-thumb {
background: var(--colorBgScrollBar);
border-radius: 4px;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: var(--colorBgScrollBarHover);
}
::-webkit-scrollbar-thumb:active {
background: var(--colorBgScrollBarActive);
}
.rc-virtual-list-scrollbar-thumb {
background: var(--colorBgScrollBar) !important;
}
.rc-virtual-list-scrollbar-thumb:hover {
background: var(--colorBgScrollBarHover) !important;
}
.rc-virtual-list-scrollbar-thumb:active {
background: var(--colorBgScrollBarActive) !important;
}
} }
/* Track */ // the custom style for mobile
::-webkit-scrollbar-track { @media (max-width: 767px) {
background: var(--colorBgScrollTrack); // ensure smooth scrolling on iOS devices
} .smooth-scroll {
-webkit-overflow-scrolling: touch;
/* Handle */ }
::-webkit-scrollbar-thumb {
background: var(--colorBgScrollBar);
border-radius: 4px;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: var(--colorBgScrollBarHover);
}
::-webkit-scrollbar-thumb:active {
background: var(--colorBgScrollBarActive);
}
.rc-virtual-list-scrollbar-thumb {
background: var(--colorBgScrollBar) !important;
}
.rc-virtual-list-scrollbar-thumb:hover {
background: var(--colorBgScrollBarHover) !important;
}
.rc-virtual-list-scrollbar-thumb:active {
background: var(--colorBgScrollBarActive) !important;
} }