Skip to content

Commit

Permalink
feat(right-sidebar): update hiding scroll bar's styles
Browse files Browse the repository at this point in the history
related issue logseq#529 (comment)
  • Loading branch information
runjuu authored and tiensonqin committed Nov 4, 2020
1 parent b5aad40 commit 646960a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 10 additions & 0 deletions resources/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
7 changes: 3 additions & 4 deletions src/main/frontend/components/right_sidebar.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 646960a

Please sign in to comment.