Skip to content

Commit

Permalink
fix: added fix to weird seam when scrollbar always is set in mac sett…
Browse files Browse the repository at this point in the history
…ings
  • Loading branch information
lamATnginx committed Feb 7, 2024
1 parent 00f243a commit 4899e95
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions assets/css/f5-hugo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,18 @@ main a:hover {
width: 50%;
}

.hide-sidebar-border {
scrollbar-width: none; /* Firefox */
}

.hide-sidebar-border::-webkit-scrollbar {
width: 0px; /* Chrome, Safari */
}

.sidebar-toggle-collapsed::-webkit-scrollbar {
width: 0px; /* Chrome, Safari */
}

.sidebar-content-collapsed-width {
max-width: 100% !important;
}
Expand Down
2 changes: 2 additions & 0 deletions assets/js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function handleInitialCollapse() {
"aria-expanded": "true",
title: "Hide sidebar navigation",
});
$("#sidebar-wrapper").addClass("hide-sidebar-border");
}
}

Expand All @@ -40,6 +41,7 @@ function handleSetCollapse() {
"aria-expanded": "true",
title: "Hide sidebar navigation",
});
$("#sidebar-wrapper").addClass("hide-sidebar-border");
$("#sidebar-wrapper").removeClass("sidebar-toggle-collapsed");
$(".sidenav").delay(500).removeClass("sidebar-col-collapsed-width");
$(".content").removeClass("sidebar-content-collapsed-width");
Expand Down

0 comments on commit 4899e95

Please # to comment.