Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/components/Scrollable/Scrollable.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.scrollbar {
.scrollbar {
--scrollable-track-thickness: 12px;
--scrollable-thumb-thickness: Calc(var(--scrollable-track-thickness)/2);
--scrollable-thumb-offset: 3px;
Expand All @@ -7,6 +7,7 @@
max-height: 100%;
max-width: 100%;
display: flex;
overflow: hidden; // Hide native scrollbars on mobile by clipping

&:hover > .scrollbar-track .scrollbar-thumb .scrollbar-thumb-inner {
opacity: 1;
Expand All @@ -17,15 +18,24 @@
position: relative;
overflow: auto;
flex: 1;
-ms-overflow-style: none; // IE 10+
-ms-overflow-style: none; // IE 10+
/* stylelint-disable */
scrollbar-width: none; // Firefox

&::-webkit-scrollbar {
width: 0;
height: 0;
background: transparent;
display: none;
-webkit-appearance: none;
}

// Hide native scrollbars on mobile devices (iOS) using negative margin technique
// This pushes the scrollbar outside the visible area where overflow:hidden clips it
margin-right: -20px;
padding-right: 20px;
margin-bottom: -20px;
padding-bottom: 20px;
}

.scrollbar-track {
Expand All @@ -40,7 +50,7 @@
background-color: rgba(28, 34, 43, 0.6);
border-radius: 4px;
opacity: 0;
transition: opacity 0.2s ease-out 0.5s; // The transition delay is used to keep the thumb visible for a short time when the cursor leaves. (see `Scrollable.constants.js`)
transition: opacity 0.2s ease-out 0.5s;
}
}
}
Expand Down