Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

fix(recent-files): fix recent files sidebar scrollbar not working on macOS (#7885)

brios02337baa9d8b
diff --git a/frontend/editor/src/core/components/shared/FileSidebar.css b/frontend/editor/src/core/components/shared/FileSidebar.css
index 45367adb8f..6ed016c21a 100644
--- a/frontend/editor/src/core/components/shared/FileSidebar.css
+++ b/frontend/editor/src/core/components/shared/FileSidebar.css
@@ -151,19 +151,7 @@
min-height: 0;
display: flex;
flex-direction: column;
- overflow-y: auto;
- overflow-x: hidden;
-}
-
-.file-sidebar-scroll::-webkit-scrollbar {
- width: 4px;
-}
-.file-sidebar-scroll::-webkit-scrollbar-track {
- background: transparent;
-}
-.file-sidebar-scroll::-webkit-scrollbar-thumb {
- background: rgb(var(--border));
- border-radius: 2px;
+ overflow: hidden;
}
/* ---- Action rows (Open from Computer, etc.) ---- */
@@ -315,7 +303,14 @@
.file-sidebar-file-list {
flex: 1;
min-height: 0;
- overflow-y: scroll;
+ overflow-y: auto;
+ overflow-x: hidden;
+ padding: 0 8px;
+ display: flex;
+ flex-direction: column;
+ gap: 3px;
+ scrollbar-width: thin;
+ scrollbar-color: var(--c-border-strong) transparent;
}
/* --- Grouped list (SaaS: Recent + per-category groups). Inert when the
@@ -482,17 +477,20 @@
}
.file-sidebar-file-list::-webkit-scrollbar {
- width: 4px;
+ width: 6px;
}
.file-sidebar-file-list::-webkit-scrollbar-track {
background: transparent;
}
.file-sidebar-file-list::-webkit-scrollbar-thumb {
- background: rgb(var(--border));
- border-radius: 2px;
+ background: var(--c-border-strong);
+ border-radius: 999px;
+ border: 1px solid transparent;
+ background-clip: content-box;
}
.file-sidebar-file-list::-webkit-scrollbar-thumb:hover {
background: var(--c-text-subtle);
+ background-clip: content-box;
}
.file-sidebar-section-divider {
diff --git a/frontend/editor/src/core/components/shared/FileSidebarFileItem.css b/frontend/editor/src/core/components/shared/FileSidebarFileItem.css
index 587779b874..b24b37a86c 100644
--- a/frontend/editor/src/core/components/shared/FileSidebarFileItem.css
+++ b/frontend/editor/src/core/components/shared/FileSidebarFileItem.css
@@ -1,26 +1,3 @@
-/* ---- File list ---- */
-.file-sidebar-file-list {
- flex: 1;
- min-height: 0;
- overflow-y: auto;
- overflow-x: hidden;
- padding: 0 8px 0 8px;
- display: flex;
- flex-direction: column;
- gap: 3px;
-}
-
-.file-sidebar-file-list::-webkit-scrollbar {
- width: 4px;
-}
-.file-sidebar-file-list::-webkit-scrollbar-track {
- background: transparent;
-}
-.file-sidebar-file-list::-webkit-scrollbar-thumb {
- background: var(--c-border);
- border-radius: 2px;
-}
-
/* ---- File item ---- */
.file-sidebar-file-item {
position: relative;