Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: auto show/hide scrollbars on hover (fixes streetwriters/notesnook#289)

thecodrr756de7e7fa56
diff --git a/apps/web/src/components/scroll-container/index.js b/apps/web/src/components/scroll-container/index.js
index 9ecc62ef0..20d2a1a85 100644
--- a/apps/web/src/components/scroll-container/index.js
+++ b/apps/web/src/components/scroll-container/index.js
@@ -1,6 +1,7 @@
import React from "react";
import { Box } from "rebass";
import { Scrollbars } from "rc-scrollbars";
+import "./style.css";
const ScrollContainer = ({ children, style, forwardedRef, ...props }) => {
return (
diff --git a/apps/web/src/components/scroll-container/style.css b/apps/web/src/components/scroll-container/style.css
index b5c44294e..9733fd68f 100644
--- a/apps/web/src/components/scroll-container/style.css
+++ b/apps/web/src/components/scroll-container/style.css
@@ -1,10 +1,11 @@
-.ScrollbarsCustom:hover .ScrollbarsCustom-Track,
-.ScrollbarsCustom:active .ScrollbarsCustom-Track,
-.ScrollbarsCustom:focus .ScrollbarsCustom-Track,
-.ScrollbarsCustom:focus-within .ScrollbarsCustom-Track {
+.rc-scrollbars-view:hover ~ .rc-scrollbars-track {
opacity: 1 !important;
}
-.ScrollbarsCustom-Thumb.ScrollbarsCustom-ThumbY {
- background-color: var(--bgSecondaryText) !important;
+.rc-scrollbars-thumb-v {
+ min-height: 30px !important;
+}
+
+.rc-scrollbars-thumb-h {
+ min-width: 15px !important;
}