From 105ac428ce8c98cd6c2fdfb289bb5717ab888cb8 Mon Sep 17 00:00:00 2001 From: Amirhossein Khalili Date: Fri, 13 Mar 2026 02:21:03 +0800 Subject: [PATCH] feat(scrollbar): add global styles for customizing scrollbars --- src/index.css | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/index.css b/src/index.css index f8cd738..5693284 100644 --- a/src/index.css +++ b/src/index.css @@ -53,3 +53,42 @@ } } } + + +/* Global Scrollbar Styles */ +::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background-color: #cbd5e1; /* Tailwind slate-300 */ + border-radius: 8px; +} + +::-webkit-scrollbar-thumb:hover { + background-color: #94a3b8; /* Tailwind slate-400 */ +} + +/* Dark mode support */ +.dark ::-webkit-scrollbar-thumb { + background-color: #334155; /* Tailwind slate-700 */ +} + +.dark ::-webkit-scrollbar-thumb:hover { + background-color: #475569; /* Tailwind slate-600 */ +} + +/* For Firefox */ +* { + scrollbar-width: thin; + scrollbar-color: #cbd5e1 transparent; +} + +.dark * { + scrollbar-color: #334155 transparent; +}