From 6c7d3efb3c1b0e56577008ad68cca36218dbd64d Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Mon, 26 Apr 2021 12:07:15 +0300 Subject: [PATCH] Adding custom scrollbar on hover Signed-off-by: Alex Andreev --- .../components/hotbar/hotbar-menu.scss | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/hotbar/hotbar-menu.scss b/src/renderer/components/hotbar/hotbar-menu.scss index b75287b659..14dd06013b 100644 --- a/src/renderer/components/hotbar/hotbar-menu.scss +++ b/src/renderer/components/hotbar/hotbar-menu.scss @@ -25,7 +25,22 @@ box-sizing: content-box; margin: 0 auto; height: 100%; - @include hidden-scrollbar; + overflow: hidden; + padding-bottom: 8px; + + &:hover { + overflow: overlay; + + &::-webkit-scrollbar { + width: 0.4em; + background: transparent; + z-index: 1; + } + + &::-webkit-scrollbar-thumb { + background: var(--borderFaintColor); + } + } .HotbarCell { width: var(--cellWidth); @@ -81,9 +96,9 @@ content: " "; position: absolute; width: 100%; - height: 30px; + height: 20px; background: linear-gradient(0deg, var(--clusterMenuBackground), transparent); - top: -30px; + top: -20px; } .Badge {