Skip to content

Commit 6d5ed44

Browse files
authored
Merge pull request #256 from wpengine/chore-docs-style-scrollbar
Added styling for the docs scrollbar
2 parents 957e721 + a12186e commit 6d5ed44

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/components/docs-layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function DocumentPage({ children, metadata }) {
5959
</DisclosurePanel>
6060
</Disclosure>
6161
<main className="relative mx-auto flex max-w-full grid-cols-[1fr_auto_1fr] flex-col gap-6 md:grid">
62-
<nav className="sticky top-[84px] hidden h-[calc(100vh-84px)] w-60 overflow-y-auto p-6 md:block">
62+
<nav className="custom-scrollbar sticky top-[84px] hidden h-[calc(100vh-84px)] w-64 overflow-y-auto p-4 md:block">
6363
<DocsNav routes={routes} />
6464
</nav>
6565
<nav className="sticky top-[84px] order-last hidden h-[calc(100vh-84px)] w-[240px] overflow-y-auto p-6 lg:block">

src/pages/global.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,23 @@ figcaption[data-language]::after {
230230
content: attr(data-language);
231231
float: right;
232232
}
233+
234+
@layer utilities {
235+
.custom-scrollbar::-webkit-scrollbar {
236+
width: 6px;
237+
}
238+
239+
.custom-scrollbar::-webkit-scrollbar-track {
240+
background: #030712;
241+
border-radius: 8px;
242+
}
243+
244+
.custom-scrollbar::-webkit-scrollbar-thumb {
245+
background: var(--color-gray-200);
246+
border-radius: 8px;
247+
}
248+
249+
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
250+
background: var(--color-gray-200);
251+
}
252+
}

0 commit comments

Comments
 (0)