Skip to content

Commit

Permalink
style: highlight sidebar and ToC scrollbar on hover (#660)
Browse files Browse the repository at this point in the history
style: change sidebar and ToC scrollbar width as thin
  • Loading branch information
razonyang committed Feb 17, 2024
1 parent 10be556 commit 9bb66f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 6 additions & 4 deletions assets/hb/modules/blog/scss/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
.hb-blog-sidebar {
grid-area: sidebar;

&::-webkit-scrollbar {
width: 2px;
}

@include media-breakpoint-up(lg) {
overflow: auto;

Expand All @@ -42,6 +38,12 @@

@include top-offset(sticky);
}

scrollbar-width: thin;

&:hover {
scrollbar-color: var(--#{$prefix}primary) transparent;
}
}

.hb-module {
Expand Down
6 changes: 6 additions & 0 deletions assets/hb/modules/blog/scss/post/_toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
}

@include top-offset;

scrollbar-width: thin;

&:hover {
scrollbar-color: var(--#{$prefix}primary) transparent;
}
}
}

Expand Down

0 comments on commit 9bb66f9

Please sign in to comment.