Browse Source

feat(right-sidebar): update hiding scroll bar's styles

related issue https://github.com/logseq/logseq/issues/529#issuecomment-721325528
Runjuu 5 years ago
parent
commit
646960a00c
2 changed files with 13 additions and 4 deletions
  1. 10 0
      resources/css/common.css
  2. 3 4
      src/main/frontend/components/right_sidebar.cljs

+ 10 - 0
resources/css/common.css

@@ -1317,3 +1317,13 @@ a.tag:hover {
 .translate-x-5 {
     --transform-translate-x: 1.25rem;
 }
+
+/* Hide scrollbar for IE, Edge and Firefox */
+.hide-scrollbar {
+    -ms-overflow-style: none;  /* IE and Edge */
+    scrollbar-width: none;  /* Firefox */
+}
+/* Hide scrollbar for Chrome, Safari and Opera */
+.hide-scrollbar::-webkit-scrollbar {
+    display: none;
+}

+ 3 - 4
src/main/frontend/components/right_sidebar.cljs

@@ -227,13 +227,12 @@
                                                     "1 0 40%"
                                                     "0 0 0px")}}
        (if sidebar-open?
-         [:div {:style {:flex "1 1 auto"
+         [:div.hide-scrollbar {:style {:flex "1 1 auto"
                         :padding 12
                         :height "100%"
-                        :overflow-y "scroll"
+                        :overflow-y "auto"
                         :overflow-x "hidden"
-                        :box-sizing "content-box"
-                        :margin-right -17}}
+                        :box-sizing "content-box"}}
           [:div.flex.flex-row.mb-2 {:key "right-sidebar-settings"}
            [:div.mr-4.text-sm
             [:a.right-sidebar-button {:on-click (fn [e]