From 9d52f0d13fc8d4fc9677d9c1b9091f9be0d29b70 Mon Sep 17 00:00:00 2001 From: Adam Brewer Date: Sun, 7 Aug 2022 13:19:03 -0400 Subject: [PATCH] Style scrollbar for supported browsers --- assets/css/main.scss | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/assets/css/main.scss b/assets/css/main.scss index ebae7727..09326df5 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -9,15 +9,33 @@ $csh-pink: #b0197e; body { + position: relative; width: 100%; height: 100%; padding: 0; margin: 0; + overflow: overlay; // For transparent scrollbar + background: white; } -body { - position: relative; - background: white; +/* Scrollbar (only supported by some browsers) */ +::-webkit-scrollbar { + width: 12px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + box-shadow: inset 0px 0px 10px 10px rgba(0,0,0,0.2); + border: 3px solid transparent; + border-radius: 5px; +} + +::-webkit-scrollbar-thumb:hover { + box-shadow: inset 0px 0px 10px 10px rgba(0, 0, 0, 0.4); + border: 2px solid transparent; } .container.spaced {