Skip to content

Commit 89ca4ed

Browse files
committed
Side scrollar for side nav
1 parent bb7f183 commit 89ca4ed

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/components/Layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export function Layout({ children, title, tableOfContents }) {
192192
className="contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex"
193193
style={{ top: bannerHeight }}
194194
>
195-
<div className="contents lg:pointer-events-auto lg:block lg:w-72 lg:overflow-y-auto lg:border-r lg:border-zinc-900/10 lg:dark:border-neutral-700/50 lg:px-6 lg:pb-8 lg:pt-4 lg:bg-white/70 lg:dark:bg-[#181A1D]/95 lg:backdrop-blur-lg xl:w-80 lg:overflow-x-visible">
195+
<div className="contents lg:pointer-events-auto lg:block lg:w-72 lg:overflow-y-auto lg:border-r lg:border-zinc-900/10 lg:dark:border-neutral-700/50 lg:px-6 lg:pb-8 lg:pt-4 lg:bg-white/70 lg:dark:bg-[#181A1D]/95 lg:backdrop-blur-lg xl:w-80 lg:overflow-x-visible sidebar-scroll">
196196
<div className="hidden lg:flex">
197197
<Link href="/" aria-label="Home">
198198
<Logo className="h-6" />

src/styles/tailwind.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@
4949
.custom-details li {
5050
margin-left: 50px !important;
5151
}
52+
53+
/* Hide scrollbar for sidebar navigation */
54+
.sidebar-scroll {
55+
scrollbar-width: none; /* Firefox */
56+
-ms-overflow-style: none; /* IE and Edge */
57+
}
58+
59+
.sidebar-scroll::-webkit-scrollbar {
60+
display: none; /* Chrome, Safari, Opera */
61+
}
5262
}
5363

5464
.imagewrapper {

0 commit comments

Comments
 (0)