From f28f0077b8e6fec09052e26a739ad0b6b8c1c902 Mon Sep 17 00:00:00 2001 From: MicroBlock <66859419+std-microblock@users.noreply.github.com> Date: Wed, 3 Dec 2025 13:13:07 +0800 Subject: [PATCH] feat: improve scrollbar --- src/styles/custom.css | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/styles/custom.css b/src/styles/custom.css index 40c659d5..514b660f 100644 --- a/src/styles/custom.css +++ b/src/styles/custom.css @@ -28,3 +28,36 @@ .sl-markdown-content pre > code { font-size: 1em; } + +/* Custom scrollbar */ +:root[data-theme="light"] ::-webkit-scrollbar-track { + background: #f1f1f1; +} + +:root[data-theme="light"] ::-webkit-scrollbar-thumb { + background: #888; +} + +:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover { + background: #555; +} + +:root[data-theme="dark"] ::-webkit-scrollbar-track { + background: #2a2a2a; +} + +:root[data-theme="dark"] ::-webkit-scrollbar-thumb { + background: #666; +} + +:root[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { + background: #aaa; +} + +::-webkit-scrollbar { + width: 8px; +} + +::-webkit-scrollbar-thumb { + border-radius: 4px; +}