@asafarim/markdown-explorer-viewer
Version:
A reusable React component for exploring and viewing markdown files with file tree navigation
62 lines (51 loc) • 1.64 kB
CSS
/* Sidebar scrolling fix */
/* Make sure the main container has proper dimensions */
.app-main {
height: calc(100vh - 120px) ; /* Subtract header/footer height */
overflow: hidden ;
}
/* Style the sidebar to be scrollable */
.demo-explorer [class*="sidebar"] {
display: flex ;
flex-direction: column ;
height: 100% ;
overflow: hidden ;
}
/* Create a scrollable container for the sidebar content */
.demo-explorer [class*="sidebarContent"] {
flex: 1 ;
overflow-y: auto ;
height: calc(100% - 60px) ; /* Subtract header height */
}
/* Ensure FileTree is scrollable */
.demo-explorer [class*="fileTree"] {
overflow-y: auto ;
height: auto ;
max-height: none ;
}
/* Make search container sticky */
.demo-explorer [class*="searchContainer"] {
position: sticky ;
top: 0 ;
z-index: 10 ;
background-color: inherit ;
}
/* Make sure the main content area is scrollable */
.demo-explorer [class*="mainContent"] {
overflow: auto ;
}
/* Custom scrollbar for WebKit browsers */
.demo-explorer [class*="sidebarContent"]::-webkit-scrollbar {
width: 6px;
}
.demo-explorer [class*="sidebarContent"]::-webkit-scrollbar-track {
background: transparent;
}
.demo-explorer [class*="sidebarContent"]::-webkit-scrollbar-thumb {
background-color: #9ca3af;
border-radius: 3px;
opacity: 0.7;
}
.demo-explorer [class*="sidebarContent"]::-webkit-scrollbar-thumb:hover {
opacity: 1;
}