From 2de2c7fc9d8ac148746575697e54beb64314444e Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 15 Aug 2024 09:59:37 +0300 Subject: [PATCH] client: Fix custom scroll bar on Chrome/Electron (closes #350) --- src/public/stylesheets/style.css | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index e2b23988a..d64061270 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -837,18 +837,24 @@ body { scrollbar-color: var(--scrollbar-background-color) var(--main-background-color); } -::-webkit-scrollbar { - width: 12px; -} +@supports selector(::-webkit-scrollbar) { + body { + scrollbar-color: unset; + } -::-webkit-scrollbar-thumb { - border-radius: 5px; - border: 1px solid var(--scrollbar-border-color); - background-color: var(--scrollbar-background-color); -} - -::-webkit-scrollbar-corner { - background-color: inherit; + ::-webkit-scrollbar { + width: 12px; + } + + ::-webkit-scrollbar-thumb { + border-radius: 5px; + border: 1px solid var(--scrollbar-border-color); + background-color: var(--scrollbar-background-color); + } + + ::-webkit-scrollbar-corner { + background-color: inherit; + } } [data-toggle="tooltip"]:not(.button-widget) span {